/* ═══════════════════════════════════════════
   MERKABAH Business Solutions — styles.css
   Brand: #1957FF (accent) | #000000 (text) | #FFFFFF (bg)
   ═══════════════════════════════════════════ */

/* ── DESIGN TOKENS ─────────────────────────── */
:root {
  --accent: #1957FF;
  --accent-light: #4d7fff;
  --accent-dark: #0f3dd4;
  --accent-glow: rgba(25, 87, 255, 0.35);
  --accent-subtle: rgba(25, 87, 255, 0.08);
  --navy: #0d1b4b;
  --navy-deep: #060e2e;

  --bg: #FFFFFF;
  --bg-alt: #f8f9ff;
  --bg-dark: #060e2e;
  --bg-dark-2: #0a1535;

  --text: #000000;
  --text-muted: #4a5568;
  --text-light: #718096;
  --text-on-dark: #e8edf8;
  --text-muted-dark: #a0aec0;

  --border: #e2e8f0;
  --border-accent: rgba(25, 87, 255, 0.3);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.14);
  --shadow-accent: 0 8px 40px rgba(25, 87, 255, 0.30);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height: 72px;
  --container-max: 1240px;
}

/* ── RESET & BASE ───────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Outfit', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  border: none;
}

/* ── CONTAINER ──────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── TYPOGRAPHY UTILITIES ───────────────────── */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.section-tag.light {
  color: var(--accent-light);
  background: rgba(25, 87, 255, 0.12);
  border-color: rgba(77, 127, 255, 0.35);
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 18px;
}

.section-title.light {
  color: var(--text-on-dark);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.75;
}

.section-subtitle.light {
  color: var(--text-muted-dark);
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-subtitle {
  margin: 0 auto;
}

.accent {
  color: var(--accent);
}

/* ── BUTTONS ────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  box-shadow: var(--shadow-accent);
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 48px rgba(25, 87, 255, 0.45);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-on-dark);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  transition: var(--transition);
  letter-spacing: 0.02em;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.05rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ═══════════════════ NAVBAR ═══════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.navbar:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-subtle);
}

.navbar:not(.scrolled) .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  box-shadow: var(--shadow-accent);
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--accent-dark) !important;
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.bar {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar:not(.scrolled) .bar {
  background: #fff;
}

/* ═══════════════════ HERO ═══════════════════ */
.hero-bg2 {
  position: absolute;
  /* O relative, según tu diseño */
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  /* Ocupa toda la pantalla */
  z-index: -1;
  /* Se queda atrás de las letras */

  /* Tu nuevo fondo degradado */
  background: hsla(240, 100%, 1%, 1);
  background: radial-gradient(circle, hsla(240, 100%, 1%, 1) 0%, hsla(240, 100%, 26%, 1) 100%);
  background: -moz-radial-gradient(circle, hsla(240, 100%, 1%, 1) 0%, hsla(240, 100%, 26%, 1) 100%);
  background: -webkit-radial-gradient(circle, hsla(240, 100%, 1%, 1) 0%, hsla(240, 100%, 26%, 1) 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#000006", endColorstr="#000086", GradientType=1);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(6, 14, 46, 0.88) 0%,
      rgba(13, 27, 75, 0.75) 50%,
      rgba(25, 87, 255, 0.2) 100%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(25, 87, 255, 0.15);
  border: 1px solid rgba(25, 87, 255, 0.4);
  color: #a8c1ff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 32px;
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s 0.1s forwards;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-light);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-light);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 8px var(--accent-light);
  }

  50% {
    opacity: 0.6;
    box-shadow: 0 0 16px var(--accent-light);
  }
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s 0.25s forwards;
}

.hero-accent {
  color: transparent;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  position: relative;
}

.hero-counter {
  color: var(--accent-light);
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: rgba(232, 237, 248, 0.85);
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.4s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.55s forwards;
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 0;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.7s forwards;
  background: rgba(6, 14, 46, 0.82);
  /* dark navy — legible on ANY background */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 20px 32px;
}

.stat-item {
  text-align: center;
  padding: 0 28px;
}

.stat-number {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.stat-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  /* increased opacity for legibility */
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  align-self: center;
}

/* ── HERO IMAGE PANEL (right column) ─────────── */
.hero-image-panel {
  position: relative;
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  animation: fadeUp 0.9s 0.35s forwards;
}

.hero-img-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: visible;
}

.hero-side-img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  display: block;
  box-shadow:
    0 0 0 1px rgba(25, 87, 255, 0.3),
    0 32px 80px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(25, 87, 255, 0.2);
}

.hero-img-frame-glow {
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius-xl) + 3px);
  background: linear-gradient(135deg,
      rgba(25, 87, 255, 0.5) 0%,
      transparent 50%,
      rgba(25, 87, 255, 0.2) 100%);
  z-index: -1;
  pointer-events: none;
  filter: blur(10px);
}

/* ── FLOATING METRIC BADGES ─────────────────── */
.hero-float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(6, 14, 46, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(25, 87, 255, 0.4);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  z-index: 10;
  white-space: nowrap;
}

.float-badge-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.float-badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.float-badge-num {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.float-badge-label {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
}

.badge-top {
  top: -40px;
  left: -40px;
  animation: float-badge-1 4s ease-in-out infinite;
}

.badge-mid {
  top: 65%;
  right: -100px;
  transform: translateY(-50%);
  animation: float-badge-2 4.5s ease-in-out 0.8s infinite;
}

.badge-bot {
  bottom: -40px;
  left: 20%;
  animation: float-badge-3 5s ease-in-out 1.5s infinite;
}

@keyframes float-badge-1 {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes float-badge-2 {

  0%,
  100% {
    transform: translateY(-50%) translateX(0px);
  }

  50% {
    transform: translateY(-50%) translateX(8px);
  }
}

@keyframes float-badge-3 {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  right: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 3;
}

.hero-scroll-hint span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, rgba(25, 87, 255, 0.8), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
  }

  51% {
    transform: scaleY(1);
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ── FADE UP ANIMATION ──────────────────────── */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════ ABOUT ═══════════════════ */
.about {
  padding: 120px 0;
  background: var(--bg);
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-visual {
  position: relative;
}

.about-card-wrapper {
  position: relative;
  padding: 20px;
}

.about-glow-card {
  background: var(--navy-deep);
  border: 1px solid rgba(25, 87, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  z-index: 2;
  box-shadow: 0 40px 80px rgba(6, 14, 46, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glow-stat {
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.glow-stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.glow-stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--accent-light);
  text-shadow: 0 0 24px rgba(25, 87, 255, 0.5);
  margin-bottom: 6px;
}

.glow-stat-label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
}

.about-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.orb-1 {
  width: 260px;
  height: 260px;
  background: rgba(25, 87, 255, 0.2);
  top: -40px;
  right: -60px;
  z-index: 1;
}

.orb-2 {
  width: 180px;
  height: 180px;
  background: rgba(25, 87, 255, 0.12);
  bottom: -30px;
  left: 0;
  z-index: 1;
}

.about-content .section-title {
  color: var(--text);
}

.about-text {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.85;
}

.about-pillars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 32px;
}

.pillar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.pillar:hover {
  border-color: var(--border-accent);
  background: var(--accent-subtle);
  transform: translateX(6px);
}

.pillar-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.pillar-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pillar-text strong {
  font-size: 0.95rem;
  color: var(--text);
}

.pillar-text span {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* ═══════════════════ PROBLEMS ═══════════════════ */
.problems {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.problems .section-header {
  margin-bottom: 60px;
}

.problems-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.problem-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: var(--transition);
}

.problem-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(25, 87, 255, 0.1);
}

.problem-card:hover::before {
  transform: scaleX(1);
}

.problem-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.problem-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.problem-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.problems-cta {
  text-align: center;
  padding: 32px;
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
}

.problems-cta p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ═══════════════════ SOLUTION ═══════════════════ */
.solution {
  padding: 120px 0;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.solution-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(25, 87, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.solution .section-title {
  color: var(--text-on-dark);
}

.solution .section-subtitle {
  color: var(--text-muted-dark);
}

.solution-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 64px;
  position: relative;
}

.solution-step {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  position: relative;
  transition: var(--transition);
}

.solution-step:hover {
  background: rgba(25, 87, 255, 0.08);
  border-color: rgba(25, 87, 255, 0.35);
  transform: translateY(-4px);
}

.step-number {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: #60a5fa;
  line-height: 1;
  margin-bottom: 20px;
  transition: var(--transition);
}

.solution-step:hover .step-number {
  color: #93c5fd;
}

.step-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-on-dark);
  margin-bottom: 12px;
}

.step-content p {
  font-size: 0.88rem;
  color: var(--text-muted-dark);
  line-height: 1.75;
}

/* ═══════════════════ SERVICES ═══════════════════ */
.services {
  padding: 120px 0;
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 64px;
}

/* ── FLIP CARDS ─────────────────────────────── */
.flip-card {
  height: 360px;
  perspective: 1200px;
  cursor: pointer;
}

.flip-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-front {
  background: var(--navy-deep);
}

.flip-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.flip-card:hover .flip-img {
  transform: scale(1.05);
}

.flip-front-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 14, 46, 0.92) 0%, rgba(6, 14, 46, 0.3) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

.flip-front-overlay h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.flip-hint {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

/* CSS visual for card 6 */
.flip-front-css {
  width: 100%;
  height: 100%;
  background: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.css-visual-6 {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 40px;
  height: 200px;
}

.css-chart-bar {
  flex: 1;
  height: var(--h);
  background: linear-gradient(to top, var(--accent), var(--accent-light));
  border-radius: 4px 4px 0 0;
  box-shadow: 0 0 20px rgba(25, 87, 255, 0.4);
  animation: bar-grow 1.5s ease both;
}

@keyframes bar-grow {
  from {
    transform: scaleY(0);
    transform-origin: bottom;
  }

  to {
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

.flip-back {
  background: rgba(13, 27, 75, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(25, 87, 255, 0.3);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 36px 32px;
  gap: 12px;
}

.flip-back-icon {
  font-size: 2rem;
}

.flip-back h3 {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
}

.flip-back p {
  color: rgba(232, 237, 248, 0.8);
  font-size: 0.88rem;
  line-height: 1.75;
  flex: 1;
}

.flip-cta {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-light);
  letter-spacing: 0.05em;
  transition: var(--transition);
}

.flip-cta:hover {
  color: #fff;
  gap: 8px;
}

/* ═══════════════════ CASES ═══════════════════ */
.cases {
  padding: 120px 0;
  position: relative;
  background: var(--bg-dark-2);
  overflow: hidden;
}

.cases-glow-left {
  position: absolute;
  top: 0;
  left: -100px;
  bottom: 0;
  width: 400px;
  background: radial-gradient(ellipse at left, rgba(25, 87, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cases-glow-right {
  position: absolute;
  top: 0;
  right: -100px;
  bottom: 0;
  width: 400px;
  background: radial-gradient(ellipse at right, rgba(25, 87, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
  position: relative;
  z-index: 1;
}

.case-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.case-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.case-card:hover {
  transform: translateY(-8px);
  border-color: rgba(25, 87, 255, 0.35);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(25, 87, 255, 0.2);
}

.case-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 12px;
}

.case-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 28px;
}

.case-metric-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.case-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-metric-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.case-metric-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
}

.case-metric-value.before {
  color: rgba(255, 255, 255, 0.4);
}

.case-metric-value.after {
  color: #4ade80;
  text-shadow: 0 0 16px rgba(74, 222, 128, 0.4);
}

.case-arrow {
  color: var(--accent-light);
  flex-shrink: 0;
}

.case-desc {
  font-size: 0.88rem;
  color: rgba(232, 237, 248, 0.65);
  line-height: 1.75;
  margin-bottom: 20px;
}

.case-badge {
  display: inline-block;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: #4ade80;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
}

/* ═══════════════════ MID CTA ═══════════════════ */
.mid-cta {
  padding: 100px 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.mid-cta-content {
  text-align: center;
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.mid-cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(25, 87, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.mid-cta-content>* {
  position: relative;
  z-index: 1;
}

.mid-cta .section-subtitle {
  margin: 0 auto 36px;
}

/* ═══════════════════ CONTACT ═══════════════════ */
.contact {
  padding: 120px 0;
  background: var(--bg-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info .section-title {
  color: var(--text);
}

.contact-desc {
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.8;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.contact-channel:hover {
  border-color: var(--border-accent);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.channel-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.channel-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.channel-text strong {
  font-size: 0.9rem;
  color: var(--text);
}

.channel-text span {
  font-size: 0.82rem;
  color: var(--text-light);
}

.contact-form-wrapper {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.92rem;
  transition: var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(25, 87, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #b0bac8;
}

.form-group select {
  cursor: pointer;
}

.form-note {
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: center;
}

/* ═══════════════════ FOOTER ═══════════════════ */
.footer {
  background: var(--navy-deep);
  padding: 80px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.6;
  margin-bottom: 24px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(25, 87, 255, 0.1);
}

.footer-links-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-links-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-col a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.45);
  transition: var(--transition);
}

.footer-links-col a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.3);
  margin-left: 16px;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* ═══════════════════ BACK TO TOP ═══════════════════ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-accent);
  z-index: 999;
  opacity: 0;
  transform: translateY(12px);
  transition: var(--transition);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
}

/* ═══════════════════ ANIMATIONS ═══════════════════ */
.particle {
  position: absolute;
  background: rgba(25, 87, 255, 0.6);
  border-radius: 50%;
  pointer-events: none;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 0.3;
  }

  100% {
    transform: translateY(-100px) scale(1);
    opacity: 0;
  }
}

/* ── CHECKBOX / CONSENT ──────────────────────── */
.checkbox-group {
  margin-top: 10px;
  margin-bottom: 20px;
}
.consent-label {
  display: flex;
  align-items: flex-start;
  position: relative;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted, #4a5568);
  user-select: none;
}
.consent-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.checkmark {
  position: absolute;
  top: 3px;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: #f7f8fc;
  border: 1.5px solid rgba(0,0,0,0.15);
  border-radius: 4px;
  transition: all 0.2s;
}
.consent-label:hover input ~ .checkmark {
  border-color: #1957FF;
}
.consent-label input:checked ~ .checkmark {
  background-color: #1957FF;
  border-color: #1957FF;
}
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent-label input:checked ~ .checkmark:after {
  display: block;
}
.consent-text {
  padding-left: 28px;
}
.text-link {
  color: #1957FF;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}
.text-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}
.consent-label input:focus ~ .checkmark {
  box-shadow: 0 0 0 3px rgba(25,87,255,0.15);
}

/* ── FORM VALIDATION STATES ──────────────────── */
.required-star {
  color: #e53e3e;
  font-size: 0.85em;
  margin-left: 2px;
}

.field-error {
  display: none;
  font-size: 0.78rem;
  color: #e53e3e;
  margin-top: 5px;
  padding-left: 2px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.form-group input.input-error,
.form-group textarea.input-error,
.form-group select.input-error {
  border-color: #e53e3e !important;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.14) !important;
}

.form-group input.input-ok,
.form-group textarea.input-ok,
.form-group select.input-ok {
  border-color: #38a169 !important;
  box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.12) !important;
}

/* Form success state */
.form-success {
  text-align: center;
  padding: 48px;
  display: none;
}

.form-success.show {
  display: block;
}

.form-success .success-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.form-success h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.form-success p {
  color: var(--text-muted);
}

/* ── Mid CTA: reducir espacio superior ── */
.mid-cta {
  padding-top: 48px !important;
}

/* ── Phone field: custom flag selector ─────────────── */
.phone-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.phone-input-group input[type="tel"] {
  flex: 1;
}

/* Trigger button */
.flag-select {
  position: relative;
  flex: 0 0 auto;
}

.flag-select-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  min-height: 48px;
  padding: 0 10px 0 12px;
  background: #f7f8fc;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #1a202c);
  transition: border-color 0.25s, box-shadow 0.25s;
  white-space: nowrap;
}

.flag-select-btn:hover,
.flag-select-btn:focus {
  outline: none;
  border-color: #1957FF;
  box-shadow: 0 0 0 3px rgba(25, 87, 255, 0.12);
}

.flag-select-flag {
  font-size: 1.2rem;
  line-height: 1;
}

.flag-select-code {
  font-size: 0.85rem;
}

.flag-select-arrow {
  opacity: 0.5;
  transition: transform 0.2s;
}

.flag-select.open .flag-select-arrow {
  transform: rotate(180deg);
}

/* Dropdown list */
.flag-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 999;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  list-style: none;
  padding: 6px;
  margin: 0;
  max-height: 260px;
  overflow-y: auto;
}

.flag-select.open .flag-select-dropdown {
  display: block;
}

.flag-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.88rem;
  color: #2d3748;
  transition: background 0.15s;
}

.flag-option:hover {
  background: #f0f4ff;
}

.flag-option.selected {
  background: #eef2ff;
  font-weight: 700;
}

.flag-option span {
  flex: 1;
}

.flag-option b {
  color: #1957FF;
  font-size: 0.82rem;
}

/* ═══════════════════ MARQUEE LOGOS ═══════════════════ */
.marquee-section {
  padding: 56px 0;
  background: #ffffff;
  overflow: hidden;
  border-top: 1px solid #e8ecf4;
  border-bottom: 1px solid #e8ecf4;
}

.marquee-header {
  text-align: center;
  margin-bottom: 36px;
}

.marquee-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.3);
}

/* ── Fade edges mask ─────────────────────────────────── */
.marquee-wrapper {
  position: relative;
  overflow: hidden;
}

.marquee-wrapper::before,
.marquee-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.marquee-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #ffffff, transparent);
}

.marquee-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #ffffff, transparent);
}

/* ── Track ───────────────────────────────────────────── */
.marquee-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}

/* Pause on hover over the whole section */
.marquee-section:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ── Individual logos — free floating, no box ─────────── */
.marquee-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.marquee-logo img {
  max-width: 130px;
  max-height: 52px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: none;
  opacity: 1;
  mix-blend-mode: multiply;
  transition: transform 0.3s ease;
  display: block;
}

.marquee-logo:hover img {
  transform: scale(1.08);
}


/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .marquee-track {
    animation-duration: 40s;
    /* slower on mobile */
  }

  .marquee-logo {
    height: 64px;
    min-width: 120px;
    padding: 12px 20px;
  }

  .marquee-logo img {
    max-width: 90px;
    max-height: 36px;
  }
}

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-image-panel {
    display: none;
  }

  .about {
    padding-top: 80px; /* compensates for the stats bar overlap */
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-visual {
    max-width: 520px;
    margin: 0 auto;
  }

  .problems-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .solution-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cases-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links .nav-link {
    color: var(--text-muted) !important;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links .nav-link:last-child {
    border-bottom: none;
  }

  .nav-cta {
    margin-top: 8px;
  }

  .hamburger {
    display: flex;
  }

  .hero-title {
    font-size: clamp(2.2rem, 9vw, 3.5rem);
  }

  .hero {
    overflow: visible; /* allow stats bar to overlap into next section */
  }

  .hero-stats {
    flex-direction: row;
    width: calc(100% - 32px);
    box-sizing: border-box;
    border-radius: var(--radius-md);
    padding: 16px 8px;
    justify-content: space-around;
    margin-bottom: -36px;   /* straddle the hero/section boundary */
    position: relative;
    z-index: 10;
  }

  .stat-divider {
    width: 1px;
    height: 40px;
    align-self: center;
  }

  .stat-item {
    padding: 0 8px;
    flex: 1;
  }

  .stat-number {
    font-size: 1.15rem;
  }

  .stat-label {
    font-size: 0.68rem;
  }

  .problems-grid {
    grid-template-columns: 1fr;
  }

  .solution-steps {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .cases-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    padding: 32px 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .hero-scroll-hint {
    display: none;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
  }
}