/* ==========================================================================
   Manobratel — estilos base + animaciones
   ========================================================================== */

:root {
  --color-primary: #f97316;
  --color-primary-dark: #ea580c;
  --color-primary-light: #fed7aa;
  --color-ink: #0f172a;
  --color-ink-soft: #1e293b;
  --color-slate: #475569;
  --color-cloud: #f8fafc;
  --shadow-soft: 0 20px 45px -20px rgba(15, 23, 42, 0.25);
  --shadow-glow: 0 10px 40px -10px rgba(249, 115, 22, 0.45);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--color-ink);
  background: var(--color-cloud);
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
}

/* ---------- Utilidades ---------- */
.text-gradient {
  background: linear-gradient(120deg, #f97316, #fb923c 45%, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.85rem 1.9rem;
  transition: transform 0.35s var(--ease-out-quart), box-shadow 0.35s var(--ease-out-quart), background 0.3s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(120deg, #f97316, #ea580c);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -8px rgba(249, 115, 22, 0.6);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
}

.btn-dark {
  background: var(--color-ink);
  color: #fff;
}
.btn-dark:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

/* ---------- Navbar ---------- */
#navbar {
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}
#navbar.scrolled {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px -10px rgba(0,0,0,0.35);
}

.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.35s var(--ease-out-quart);
}
.nav-link:hover::after { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 20%, #1e293b 0%, #0f172a 55%, #020617 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: float-blob 14s ease-in-out infinite;
}
.blob-1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #f97316, transparent 70%);
  top: -120px; right: -80px;
  animation-delay: 0s;
}
.blob-2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, #fbbf24, transparent 70%);
  bottom: -100px; left: -60px;
  animation-delay: -6s;
}
.blob-3 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, #fb7185, transparent 70%);
  top: 40%; left: 55%;
  animation-delay: -3s;
  opacity: 0.35;
}

@keyframes float-blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.08); }
  66% { transform: translate(-25px, 25px) scale(0.95); }
}

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
}

.float-icon {
  position: absolute;
  animation: float-icon 6s ease-in-out infinite;
  color: rgba(255,255,255,0.5);
}
@keyframes float-icon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

.hero-badge {
  animation: pulse-badge 2.6s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
}

.hero-tools {
  animation: hero-in 1s var(--ease-out-quart) both;
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Cards ---------- */
.card-category {
  transition: transform 0.5s var(--ease-out-quart), box-shadow 0.5s var(--ease-out-quart);
  transform-style: preserve-3d;
}
.card-category:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-soft);
}
.card-category .icon-wrap {
  transition: transform 0.5s var(--ease-out-quart), background 0.4s ease;
}
.card-category:hover .icon-wrap {
  transform: rotate(-8deg) scale(1.1);
}

.card-service {
  transition: transform 0.4s var(--ease-out-quart), box-shadow 0.4s var(--ease-out-quart), border-color 0.4s ease;
}
.card-service:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: var(--color-primary);
}

.card-shine {
  position: relative;
  overflow: hidden;
}
.card-shine::before {
  content: "";
  position: absolute;
  top: 0; left: -150%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.8s ease;
}
.card-shine:hover::before { left: 150%; }

/* ---------- Stats counters ---------- */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ---------- Steps / how it works ---------- */
.step-line {
  background: repeating-linear-gradient(90deg, var(--color-primary) 0 10px, transparent 10px 20px);
  height: 2px;
}

/* ---------- Testimonials marquee-ish ---------- */
.testimonial-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

/* ---------- Forms ---------- */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
}

input:focus, select:focus, textarea:focus {
  outline: none;
}

/* ---------- Scroll reveal (fallback sin JS de terceros) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out-quart), transform 0.8s var(--ease-out-quart);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="scale"] { transform: scale(0.92); }
[data-reveal="scale"].is-visible { transform: scale(1); }
[data-reveal="left"] { transform: translateX(-30px); }
[data-reveal="left"].is-visible { transform: translateX(0); }
[data-reveal="right"] { transform: translateX(30px); }
[data-reveal="right"].is-visible { transform: translateX(0); }

/* ---------- Marquee de logos/valores ---------- */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 22s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-cloud); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--color-primary), var(--color-primary-dark));
  border-radius: 10px;
}

/* ---------- Loader de página ---------- */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--color-ink);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-spin {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(249,115,22,0.25);
  border-top-color: var(--color-primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Botón WhatsApp flotante ---------- */
.fab-whatsapp {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 50;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 12px 30px -8px rgba(18, 140, 126, 0.6);
  animation: fab-bounce 3.2s ease-in-out infinite;
  transition: transform 0.3s ease;
}
.fab-whatsapp:hover { transform: scale(1.1); }
@keyframes fab-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---------- Progress bar de scroll ---------- */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, #f97316, #fbbf24);
  z-index: 60; width: 0%;
  transition: width 0.1s ease-out;
}

/* ---------- Rating stars ---------- */
.star { color: #fbbf24; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 768px) {
  .blob { filter: blur(50px); }
}
