/* ════════════════════════════════════════
   B Solutions — Styles
   Estilos custom que complementan a Tailwind (cargado por CDN).
   ════════════════════════════════════════ */

html { scroll-behavior: smooth; }
body {
  font-family: 'General Sans', system-ui, sans-serif;
  color: #0A0A0A;
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}

.font-display { font-family: 'General Sans', system-ui, sans-serif; letter-spacing: -0.02em; }
.tracking-tight2 { letter-spacing: -0.025em; }

/* Section padding offset for sticky nav */
section[id] { scroll-margin-top: 72px; }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease-out, transform .7s ease-out; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(16px); transition: opacity .6s ease-out, transform .6s ease-out; }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: .00s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .07s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .14s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .21s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: .28s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: .35s; }

/* Service card hover */
.svc-card { transition: transform .2s ease-out, border-color .2s ease-out, box-shadow .2s ease-out; }
.svc-card:hover { transform: translateY(-3px); border-color: #FF6B1A; box-shadow: 0 4px 12px rgba(10,10,10,0.06), 0 12px 24px rgba(10,10,10,0.06); }
.svc-card:hover .svc-icon { color: #FF6B1A; border-color: #FF6B1A; }
.svc-card:hover .svc-more { color: #FF6B1A; }
.svc-card:hover .svc-more svg { transform: translateX(3px); }
.svc-more svg { transition: transform .2s ease-out; }

/* Project card */
.proj-card .proj-img { transition: transform .5s ease-out; }
.proj-card:hover .proj-img { transform: scale(1.05); }
.proj-card .proj-overlay { transition: opacity .25s ease-out; }
.proj-card:hover .proj-overlay { opacity: 1; }

/* Nav link active */
.nav-link { position: relative; color: #525252; transition: color .2s ease-out; }
.nav-link:hover { color: #0A0A0A; }
.nav-link.active { color: #0A0A0A; }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: #FF6B1A;
  border-radius: 2px;
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 500; transition: background-color .2s ease-out, color .2s ease-out, border-color .2s ease-out, transform .2s ease-out; }
.btn-primary { background: #FF6B1A; color: white; padding: .75rem 1.25rem; border-radius: 8px; }
.btn-primary:hover { background: #E55A0F; }
.btn-outline-dark { border: 1px solid #E5E5E5; color: #0A0A0A; padding: .75rem 1.25rem; border-radius: 8px; background: white; }
.btn-outline-dark:hover { border-color: #0A0A0A; }
.btn-outline-light { border: 1px solid rgba(255,255,255,0.4); color: white; padding: .75rem 1.25rem; border-radius: 8px; background: rgba(255,255,255,0.04); backdrop-filter: blur(4px); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.7); }

/* Inputs */
.field { display: block; width: 100%; padding: .75rem .875rem; border: 1px solid #E5E5E5; border-radius: 10px; background: white; color: #0A0A0A; font-size: .95rem; transition: border-color .15s ease-out, box-shadow .15s ease-out; }
.field:focus { outline: none; border-color: #FF6B1A; box-shadow: 0 0 0 3px rgba(255,107,26,0.15); }
.field.is-error { border-color: #DC2626; }
.field-label { display: block; font-size: .8rem; font-weight: 500; color: #525252; margin-bottom: .35rem; letter-spacing: .01em; text-transform: uppercase; }

/* Focus ring (a11y) */
:focus-visible { outline: 2px solid #FF6B1A; outline-offset: 2px; border-radius: 4px; }

/* Hero scroll indicator */
@keyframes hint { 0%,100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(6px); opacity: 1; } }
.scroll-hint { animation: hint 1.8s ease-in-out infinite; }

/* Modal */
.modal-backdrop { background: rgba(10,10,10,0.6); backdrop-filter: blur(8px); }
.modal-enter { opacity: 0; }
.modal-enter.is-open { opacity: 1; transition: opacity .25s ease-out; }
.modal-panel { transform: scale(.96); opacity: 0; transition: opacity .3s ease-out, transform .3s ease-out; }
.modal-enter.is-open .modal-panel { transform: scale(1); opacity: 1; }

/* Placeholder images: subtly-striped */
.ph {
  background-image:
    repeating-linear-gradient(
      135deg,
      #E5E5E5 0px, #E5E5E5 1px,
      transparent 1px, transparent 14px
    ),
    linear-gradient(180deg, #F5F5F5 0%, #EAEAEA 100%);
  color: #525252;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .04em;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 1rem;
}
.ph-dark {
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px,
      transparent 1px, transparent 14px
    ),
    linear-gradient(180deg, #1f1f1f 0%, #0c0c0c 100%);
  color: rgba(255,255,255,0.6);
}

/* Hero video poster placeholder fallback (visible si todavía no hay video) */
.hero-poster {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,107,26,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(255,255,255,0.06) 0%, transparent 50%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, #0c0c0c 0%, #171717 100%);
}

/* Process timeline connector */
.step-line { background: repeating-linear-gradient(90deg, #E5E5E5 0 6px, transparent 6px 12px); }
.step-line-v { background: repeating-linear-gradient(180deg, #E5E5E5 0 6px, transparent 6px 12px); }

/* Clients marquee */
.logos-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #171717;
  padding: 2rem 0;
}
.logos-marquee::before,
.logos-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10%;
  pointer-events: none;
  z-index: 2;
}
.logos-marquee::before {
  left: 0;
  background: linear-gradient(90deg, #171717, transparent);
}
.logos-marquee::after {
  right: 0;
  background: linear-gradient(270deg, #171717, transparent);
}
.logos-track {
  display: flex;
  align-items: center;
  width: fit-content;
  gap: 1.5rem;
  animation: scroll-logos 60s linear infinite;
}
.logos-track:hover { animation-play-state: paused; }
.logos-track img {
  height: 36px;
  width: auto;
  max-width: 160px;
  flex-shrink: 0;
  object-fit: contain;
  padding: 0;
  opacity: .75;
  transition: opacity .3s ease;
}
.logos-track img:hover { opacity: 1; }
@media (min-width: 768px) {
  .logos-marquee { padding: 3rem 0; }
  .logos-track { gap: 3rem; }
  .logos-track img { height: 48px; }
}
@keyframes scroll-logos {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scroll-hint { animation: none !important; }
  html { scroll-behavior: auto !important; }
  .logos-track { animation: none !important; flex-wrap: wrap; justify-content: center; width: 100%; }
  .logos-marquee::before, .logos-marquee::after { display: none; }
}

/* Hide scrollbar in modal thumbs */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Drawer */
.drawer { transform: translateX(100%); transition: transform .3s ease-out; }
.drawer.is-open { transform: translateX(0); }

/* Nav logo swap (white over hero, color after scroll) */
#nav.is-scrolled .nav-logo-white { opacity: 0; }
#nav.is-scrolled .nav-logo-color { opacity: 1; }
/* Nav links y CTA contrastan sobre hero oscuro */
#nav:not(.is-scrolled) .nav-link { color: rgba(255,255,255,0.85); }
#nav:not(.is-scrolled) .nav-link:hover,
#nav:not(.is-scrolled) .nav-link.active { color: #ffffff; }
#nav:not(.is-scrolled) #menu-btn { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.25); color: #fff; }
