/* FH Soluciones Integrales — estilos vanilla, sin frameworks ni build de CSS. */

:root {
  --navy: #0b2d5c;
  --navy-dark: #082246;
  --navy-alt: #123a70;
  --navy-tint: #eef2f8;
  --silver: #bfc3c8;
  --silver-dark: #8b9198;
  --white: #ffffff;
  --ink: #17202b;
  --ink-soft: #4b5563;
  --on-navy: #ffffff;
  --on-navy-soft: #c3cddc;
  --whatsapp: #25d366;

  --font-display: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

  --container: 1180px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 10px 30px -12px rgba(11, 45, 92, 0.18);
  --shadow-lift: 0 20px 45px -18px rgba(11, 45, 92, 0.28);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glow-silver: rgba(191, 195, 200, 0.35);
  --glow-whatsapp: rgba(37, 211, 102, 0.25);
  --glow-white: rgba(255, 255, 255, 0.28);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--on-navy-soft);
  background: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg, picture { display: block; max-width: 100%; }

h1, h2, h3 { font-family: var(--font-display); color: var(--on-navy); margin: 0 0 0.5em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); }
h2 { font-size: clamp(1.6rem, 2.4vw + 1rem, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--on-navy-soft); }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
blockquote { margin: 0; }

/* Dentro de una tarjeta blanca (.card), el texto vuelve a los tonos oscuros
   originales: las tarjetas son las únicas superficies claras de la página. */
.card h1, .card h2, .card h3 { color: var(--navy); }
.card p { color: var(--ink-soft); }

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

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}
.mobile-nav a:focus-visible { outline-color: var(--navy); }

/* Botones ------------------------------------------------------------- */

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); }
@media (prefers-reduced-motion: reduce) {
  .btn::after { transition: none; display: none; }
}
.btn-primary { background: var(--white); color: var(--navy); box-shadow: var(--shadow-card); }
.btn-primary:hover { background: var(--silver); box-shadow: var(--shadow-lift); }
.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-light { background: var(--white); color: var(--navy); box-shadow: var(--shadow-lift); }
.btn-light:hover { background: var(--silver); }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn .icon { width: 18px; height: 18px; }

/* Encabezado ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 34, 70, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.site-header.is-scrolled {
  box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.12);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-block: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img, .footer-brand img { border-radius: 50%; object-fit: cover; }
.brand .brand-name { font-family: var(--font-display); font-weight: 700; color: var(--on-navy); font-size: 1.05rem; }
.site-nav { margin-inline: auto; }
.site-nav ul { display: flex; gap: 22px; }
.site-nav a { font-weight: 500; font-size: 0.94rem; color: var(--on-navy-soft); position: relative; padding: 4px 0; }
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.site-nav a:hover::after { transform: scaleX(1); }
.header-cta { flex-shrink: 0; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none;
  padding: 0;
}
.nav-toggle span { display: block; height: 2px; background: var(--white); border-radius: 2px; }
.mobile-nav { display: none; }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav {
    display: block;
    background: var(--white);
    border-top: 1px solid var(--navy-tint);
    padding: 12px 24px 20px;
  }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav ul { display: flex; flex-direction: column; gap: 14px; }
  .mobile-nav a { font-weight: 600; color: var(--navy); font-size: 1.05rem; }
}

/* Animación de aparición -------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-left { transform: translate(-28px, 0); }
.reveal-left.is-visible { transform: translate(0, 0); }
.reveal-right { transform: translate(28px, 0); }
.reveal-right.is-visible { transform: translate(0, 0); }
.reveal-scale { transform: scale(0.94); }
.reveal-scale.is-visible { transform: scale(1); }

/* Aparición escalonada: cada tarjeta de una grilla espera un poco más que la
   anterior, para que entren en cascada en vez de todas a la vez. */
.grid.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.grid.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
.grid.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.grid.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.24s; }
.grid.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.32s; }
.grid.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale { transition: none !important; }
}

/* Fondo decorativo: blobs difuminados con brillo + grilla animada -------------- */

.bg-decor { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.bg-grid {
  position: absolute;
  inset: -1px;
  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: 44px 44px;
  animation: grid-drift 26s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 85%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 85%);
}
/* .bg-blob se posiciona y JS le anima "transform" para el parallax del
   mouse. .bg-blob-fill (adentro) es quien tiene el color y a quien CSS le
   anima "transform" para el flote: si ambas animaran la misma propiedad del
   mismo elemento, una pisaría a la otra. */
.bg-blob { position: absolute; border-radius: 50%; transition: transform 0.3s var(--ease); }
.bg-blob-fill {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.8;
  will-change: transform;
  animation: blob-float 20s var(--ease) infinite alternate;
}
.bg-blob-1 {
  width: 420px; height: 420px;
  top: -140px; left: -120px;
}
.bg-blob-1 .bg-blob-fill { background: radial-gradient(circle, var(--glow-silver), transparent 70%); }
.bg-blob-2 {
  width: 380px; height: 380px;
  bottom: -160px; right: -100px;
}
.bg-blob-2 .bg-blob-fill {
  background: radial-gradient(circle, var(--glow-whatsapp), transparent 70%);
  animation-duration: 24s;
  animation-delay: -6s;
}
.bg-blob-3 {
  width: 260px; height: 260px;
  top: 30%; right: 12%;
}
.bg-blob-3 .bg-blob-fill {
  background: radial-gradient(circle, var(--glow-white), transparent 70%);
  animation-duration: 17s;
  animation-delay: -3s;
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 44px 44px, 44px 44px; }
}
@keyframes blob-float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(26px, -20px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-grid, .bg-blob-fill { animation: none; }
  .bg-blob { transition: none; }
}

/* Hero -------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 64px 88px;
  background: linear-gradient(180deg, var(--navy), var(--navy-dark));
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-subtitle { font-size: 1.1rem; max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-block: 8px 26px; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.trust-badges li {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--on-navy);
  display: flex;
  align-items: center;
  gap: 6px;
}
.trust-badges li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--silver-dark);
}
.hero-visual svg, .hero-visual img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 100%; height: auto; object-fit: cover;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}

/* Secciones genéricas ------------------------------------------------------ */

.section { padding-block: 84px; }
.section-alt { background: var(--navy-alt); }
.section-title { text-align: center; }
.section-intro { font-size: 1.05rem; }
.section-intro-centered { text-align: center; max-width: 62ch; margin-inline: auto; }
.section-cta { text-align: center; margin-top: 44px; }

.grid { display: grid; gap: 28px; }
.benefit-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 48px; }
.testimonial-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 48px; }
.photo-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 48px; }

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 60px -20px var(--glow-silver);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--navy-tint);
  color: var(--navy);
  margin-bottom: 18px;
}
.service-benefit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.92rem;
  margin: 0;
}
.service-benefit .icon { color: var(--whatsapp); flex-shrink: 0; }

/* Servicios — filas compactas con foto o icono grande ------------------------ */

.service-list { display: flex; flex-direction: column; gap: 24px; margin-top: 48px; }
.service-row {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px;
}
.service-row-reverse { flex-direction: row-reverse; }
.service-media {
  flex-shrink: 0;
  width: 220px; height: 165px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.service-media-img, .service-media svg {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s var(--ease);
}
.service-row:hover .service-media-img,
.service-row:hover .service-media svg { transform: scale(1.08); }
.service-content { flex: 1; min-width: 0; }
.service-content h3 { margin-bottom: 8px; }
.service-content p:not(.service-benefit) { margin-bottom: 12px; }

.service-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.service-row-featured {
  border: 1px solid rgba(11, 45, 92, 0.15);
  box-shadow: var(--shadow-card), 0 0 0 4px rgba(11, 45, 92, 0.05);
}
.service-row-featured .service-media { box-shadow: 0 0 0 3px var(--navy-tint); }

@media (max-width: 720px) {
  .service-row, .service-row-reverse { flex-direction: column; align-items: stretch; }
  .service-media { width: 100%; height: 200px; }
}

/* Cierres de cristal / malla ------------------------------------------------ */

.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-grid-reverse { direction: rtl; }
.split-grid-reverse > * { direction: ltr; }
.check-list { display: flex; flex-direction: column; gap: 12px; margin-block: 22px 30px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--on-navy); }
.check-list .icon { color: var(--whatsapp); flex-shrink: 0; }

.illustration-panel svg, .illustration-panel img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 100%; height: auto; object-fit: cover;
}

@media (max-width: 900px) {
  .split-grid, .split-grid-reverse { grid-template-columns: 1fr; direction: ltr; }
}

/* Proceso ------------------------------------------------------------------ */

.process-list {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  counter-reset: step;
}
.process-step { text-align: center; padding: 0 8px; }
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 16px;
}
.process-step h3 { font-size: 1.02rem; }
.process-step p { font-size: 0.92rem; }

@media (max-width: 980px) {
  .process-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .process-list { grid-template-columns: 1fr; }
}

/* Testimonios ---------------------------------------------------------------- */

.testimonial-card { display: flex; flex-direction: column; gap: 14px; }
.stars { display: flex; gap: 3px; }
.star { width: 18px; height: 18px; color: var(--silver); }
.star .icon { width: 100%; height: 100%; fill: currentColor; stroke: none; }
.star.is-filled { color: #f4b400; }
blockquote { font-size: 1.02rem; color: var(--ink); font-style: italic; }
.testimonial-card figcaption { display: flex; flex-direction: column; }
.testimonial-name { font-weight: 700; color: var(--navy); }
.testimonial-role { font-size: 0.85rem; color: var(--ink-soft); }

/* Galería de trabajos ---------------------------------------------------------- */

.photo-card { position: relative; padding: 0; overflow: hidden; margin: 0; }
.photo-card img { width: 100%; height: 260px; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
.photo-card:hover img { transform: scale(1.08); }
.photo-card figcaption { padding: 16px 20px; font-weight: 600; color: var(--navy); font-size: 0.95rem; }
.photo-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  background: rgba(8, 34, 70, 0.85);
  backdrop-filter: blur(4px);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: 999px;
}

/* CTA final ------------------------------------------------------------------ */

.final-cta { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--navy-dark), #050f22); }
.final-cta-inner { position: relative; z-index: 1; max-width: 760px; text-align: center; }
.final-cta h2 { color: var(--white); }
.final-cta p { color: rgba(255, 255, 255, 0.85); font-size: 1.08rem; margin-bottom: 30px; }
.final-cta-phone { margin-top: 18px; font-weight: 600; }
.final-cta-phone a { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }

/* Footer ---------------------------------------------------------------------- */

.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.85);
  padding-block: 56px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer-brand .brand-name { font-family: var(--font-display); font-weight: 700; color: var(--white); margin-block: 14px 4px; }
.footer-slogan { font-style: italic; color: var(--silver); }
.site-footer h3 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.footer-list { display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.footer-list li { display: flex; align-items: center; gap: 8px; }
.footer-list a:hover { color: var(--silver); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.82rem; color: var(--silver); }

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Botón flotante de WhatsApp ---------------------------------------------------- */

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s var(--ease);
}
.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--whatsapp);
  animation: pulse-ring 2.4s var(--ease) infinite;
  z-index: -1;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float .icon { width: 28px; height: 28px; fill: currentColor; stroke: none; }

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float::before { animation: none; display: none; }
}

@media (max-width: 480px) {
  .whatsapp-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
}
