/* ─── Fuente ─────────────────────────────────────────────────────────────── */
/* Google Fonts loaded via <link> in head.ejs — Outfit + Inter */

/* ─── Smooth scrolling ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ─── Selection color ────────────────────────────────────────────────────── */
::selection { background: rgba(59,130,246,0.2); color: #0f1b4c; }

/* ─── Custom scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ─── Scroll reveal ──────────────────────────────────────────────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(.16,1,.3,1), transform 0.7s cubic-bezier(.16,1,.3,1);
}
.reveal-up.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.7s cubic-bezier(.16,1,.3,1), transform 0.7s cubic-bezier(.16,1,.3,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.7s cubic-bezier(.16,1,.3,1), transform 0.7s cubic-bezier(.16,1,.3,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ─── Gradient text ──────────────────────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #60A5FA 0%, #93C5FD 50%, #BFDBFE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Animated mesh gradient background ─────────────────────────────────── */
.bg-mesh {
  background-color: #0F1B4C;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(37,99,235,0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(29,78,216,0.25) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 60% 10%, rgba(96,165,250,0.15) 0%, transparent 50%);
}

/* ─── Dot grid overlay ───────────────────────────────────────────────────── */
.dot-grid {
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ─── Floating gears ─────────────────────────────────────────────────────── */
@keyframes float-slow {
  0%,100% { transform: translateY(0)   rotate(0deg);   }
  50%      { transform: translateY(-18px) rotate(90deg); }
}
@keyframes float-reverse {
  0%,100% { transform: translateY(0)   rotate(0deg);    }
  50%      { transform: translateY(14px)  rotate(-60deg); }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.gear-float-1 { animation: float-slow    14s ease-in-out infinite; }
.gear-float-2 { animation: float-reverse 18s ease-in-out infinite; }
.gear-spin    { animation: spin-slow     40s linear infinite; }

/* ─── Glassmorphism card ─────────────────────────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
}

/* ─── Service cards hover glow ───────────────────────────────────────────── */
.service-card {
  transition: transform 0.4s cubic-bezier(.16,1,.3,1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 25px 60px rgba(15,27,76,0.12),
    0 8px 24px rgba(30,64,175,0.08),
    0 0 0 1px rgba(59,130,246,0.06);
  border-color: rgba(59,130,246,0.15);
}

/* ─── Brands marquee ─────────────────────────────────────────────────────── */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-fade {
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}

/* ─── Stat card pulse ────────────────────────────────────────────────────── */
@keyframes pulse-ring {
  0%   { transform: scale(1);    opacity: 0.6; }
  100% { transform: scale(1.5);  opacity: 0; }
}
.stat-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.5rem; /* match parent rounded-3xl */
  border: 2px solid rgba(96,165,250,0.5);
  animation: pulse-ring 2.5s cubic-bezier(.4,0,.6,1) infinite;
}

/* ─── Article content ────────────────────────────────────────────────────── */
.article-content { color:#334155; line-height:1.85; font-size:1.0625rem; }
.article-content h2 { font-family:'Outfit',sans-serif; font-size:1.5rem; font-weight:800; color:#0f172a; margin-top:2.5rem; margin-bottom:1rem; border-left:4px solid #1d4ed8; padding-left:1rem; text-transform:uppercase; font-style:italic; }
.article-content h3 { font-family:'Outfit',sans-serif; font-size:1.125rem; font-weight:700; color:#1e3a8a; margin-top:1.75rem; margin-bottom:.75rem; text-transform:uppercase; font-style:italic; }
.article-content p  { margin-bottom:1.25rem; }
.article-content ul,.article-content ol { margin:1rem 0 1.5rem 1.5rem; }
.article-content ul li { list-style-type:disc; margin-bottom:.5rem; }
.article-content ol li { list-style-type:decimal; margin-bottom:.5rem; }
.article-content strong { font-weight:700; color:#1e293b; }
.article-content a { color:#1d4ed8; text-decoration:underline; text-underline-offset:3px; transition:color .2s; }
.article-content a:hover { color:#1e40af; }
.article-content blockquote { background:#eff6ff; border-left:4px solid #3b82f6; padding:1rem 1.5rem; border-radius:0 .75rem .75rem 0; margin:1.5rem 0; font-style:italic; color:#1e40af; }
.article-content blockquote p { margin:0; }
.article-content table { width:100%; border-collapse:collapse; margin:1.5rem 0; font-size:.9rem; border-radius:.75rem; overflow:hidden; box-shadow:0 1px 8px rgba(0,0,0,.06); }
.article-content thead { background:#1e40af; color:white; }
.article-content th { padding:.75rem 1rem; text-align:left; font-weight:600; font-size:.8rem; text-transform:uppercase; letter-spacing:.05em; }
.article-content td { padding:.7rem 1rem; border-bottom:1px solid #e2e8f0; color:#475569; }
.article-content tr:last-child td { border-bottom:none; }
.article-content tr:nth-child(even) td { background:#f8fafc; }
.article-content img { border-radius: .75rem; margin: 1.5rem 0; box-shadow: 0 4px 20px rgba(0,0,0,.08); }

/* ─── Header ─────────────────────────────────────────────────────────────── */
#main-header.scrolled #main-nav {
  box-shadow: 0 4px 30px rgba(0,0,0,.08);
  border-bottom-color: transparent;
}

/* ─── Nav links ──────────────────────────────────────────────────────────── */
.nav-link {
  position: relative;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  border-radius: 0.5rem;
  transition: color .2s, background .2s;
}
.nav-link:hover {
  color: #1d4ed8;
  background: rgba(59,130,246,.05);
}
.nav-link-active {
  color: #1d4ed8;
  font-weight: 600;
}
.nav-link-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: #1d4ed8;
  border-radius: 1px;
}

/* ─── Mobile nav links ───────────────────────────────────────────────────── */
.mobile-nav-link {
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #334155;
  border-radius: 0.5rem;
  transition: background .2s, color .2s;
}
.mobile-nav-link:hover {
  background: #f1f5f9;
  color: #1d4ed8;
}

/* ─── Gradient brand ─────────────────────────────────────────────────────── */
.bg-gradient-brand { background: linear-gradient(135deg, #0f1b4c 0%, #1e40af 55%, #1d4ed8 100%); }

/* ─── Line clamp ─────────────────────────────────────────────────────────── */
.line-clamp-2 { display:-webkit-box; -webkit-line-clamp:2; line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.line-clamp-3 { display:-webkit-box; -webkit-line-clamp:3; line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

/* ─── Diagonal divider ───────────────────────────────────────────────────── */
.clip-diagonal { clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
.clip-diagonal-inv { clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 100%); }

/* ─── CTA button shine ───────────────────────────────────────────────────── */
@keyframes shine {
  0%   { left: -100%; }
  100% { left:  200%; }
}
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-20deg);
  animation: shine 3.5s ease-in-out infinite;
}

/* ─── Page fade in ───────────────────────────────────────────────────────── */
main { animation: fadeIn 0.35s ease-out; }
@keyframes fadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }

/* ─── Accessibility focus ────────────────────────────────────────────────── */
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline: 2px solid #3b82f6; outline-offset: 2px; border-radius: 4px;
}

/* ─── Hero content animation ─────────────────────────────────────────────── */
.hero-content > * {
  opacity: 0;
  transform: translateY(20px);
}
.hero-loaded .hero-content > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(.16,1,.3,1), transform 0.6s cubic-bezier(.16,1,.3,1);
}
.hero-loaded .hero-content > *:nth-child(1) { transition-delay: 0.1s; }
.hero-loaded .hero-content > *:nth-child(2) { transition-delay: 0.25s; }
.hero-loaded .hero-content > *:nth-child(3) { transition-delay: 0.4s; }
.hero-loaded .hero-content > *:nth-child(4) { transition-delay: 0.55s; }
.hero-loaded .hero-content > *:nth-child(5) { transition-delay: 0.7s; }

/* ─── Grayscale hover transition ─────────────────────────────────────────── */
.grayscale { filter: grayscale(100%); }
.grayscale:hover,
.group:hover .grayscale {
  filter: grayscale(0%);
}

/* ─── WhatsApp button entrance animation ─────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px) scale(0.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.whatsapp-float {
  animation: fadeInUp 0.5s ease-out 1.5s both;
}
@keyframes whatsapp-ping {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
}
.whatsapp-float:not(:hover) {
  animation: fadeInUp 0.5s ease-out 1.5s both, whatsapp-ping 3s ease-in-out 3s infinite;
}

/* ─── Prose (Blog Content) Typography Overrides ──────────────────────────── */
.prose h2, .prose h3, .prose h4 {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  text-transform: uppercase;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0f1b4c;
}
.prose h2 {
  font-size: 2.25rem;
  line-height: 1.1;
  margin-top: 2em;
  margin-bottom: 0.75em;
}
.prose h3 {
  font-size: 1.75rem;
  line-height: 1.15;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* ─── Footer link hover effect ───────────────────────────────────────────── */
footer a {
  transition: color .2s, transform .2s;
}
footer a:hover {
  transform: translateX(2px);
}

/* ─── Premium shadow presets ─────────────────────────────────────────────── */
.shadow-brand { box-shadow: 0 4px 14px rgba(29,78,216,0.3); }
.shadow-premium { box-shadow: 0 25px 50px -12px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.02); }

/* ─── Image zoom on hover ────────────────────────────────────────────────── */
.img-zoom { overflow: hidden; }
.img-zoom img {
  transition: transform .7s cubic-bezier(.16,1,.3,1);
}
.img-zoom:hover img,
.group:hover .img-zoom img {
  transform: scale(1.05);
}

/* ─── FAQ smooth open ────────────────────────────────────────────────────── */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(.16,1,.3,1), padding .3s ease;
  padding-top: 0;
  padding-bottom: 0;
}
.faq-answer.open {
  max-height: 500px;
  padding-top: 0;
  padding-bottom: 1.25rem;
}

/* ─── Gradient text on CTA ───────────────────────────────────────────────── */
.text-gradient-gold {
  background: linear-gradient(135deg, #f59e0b, #eab308, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Loading skeleton ───────────────────────────────────────────────────── */
@keyframes skeleton {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200px 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: 0.5rem;
}

/* ─── Smooth section transitions ─────────────────────────────────────────── */
section + section {
  position: relative;
}

/* ─── Back to top button ─────────────────────────────────────────────────── */
.back-to-top {
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  transform: translateY(-3px);
}
