/* ─────────────────────────────────────────────────────────────
   Cabral CV — custom.css
   ───────────────────────────────────────────────────────────── */

/* ── Fuente local: Fontello (íconos) ─────────────────────────── */
@font-face {
  font-family: 'fontello';
  src: url('../fonts/fontello.woff2') format('woff2'),
       url('../fonts/fontello.woff')  format('woff'),
       url('../fonts/fontello.ttf')   format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

[class^="icon-"],
[class*=" icon-"] {
  font-family: 'fontello';
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Scroll reveal ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .65s cubic-bezier(.22,1,.36,1),
              transform .65s cubic-bezier(.22,1,.36,1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Nav scrolled state ──────────────────────────────────────── */
#navbar.scrolled {
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 1px 0 rgba(255,255,255,.05);
}

/* ── Hero background tuning (independent of Tailwind utils) ─── */
.hero-bg-layer {
  opacity: 0.99;
}
.hero-dark-overlay {
  background: linear-gradient(
    to right,
    rgba(10, 10, 10, 0.42) 0%,
    rgba(10, 10, 10, 0.18) 55%,
    rgba(10, 10, 10, 0.03) 100%
  );
}
@media (max-width: 639px) {
  .hero-bg-layer {
    opacity: 0.72;
  }
  .hero-dark-overlay {
    background: linear-gradient(
      to right,
      rgba(10, 10, 10, 0.62) 0%,
      rgba(10, 10, 10, 0.34) 55%,
      rgba(10, 10, 10, 0.12) 100%
    );
  }
}

/* ── Service icon SVGs (fill:#414141 → blanco) ───────────────── */
.service-icon-img {
  filter: brightness(0) invert(1);
  opacity: .55;
  transition: opacity .3s;
}
.group:hover .service-icon-img {
  opacity: 1;
}

/* ── Service icon size/alignment (mobile first) ───────────────── */
.service-icon-wrap {
  width: 4rem;
  height: 4rem;
  margin-left: auto;
  margin-right: auto;
}
.service-icon-wrap .service-icon-img {
  width: 2rem;
  height: 2rem;
}
@media (min-width: 640px) {
  .service-icon-wrap {
    width: 3.25rem;
    height: 3.25rem;
    margin-left: 0;
    margin-right: 0;
  }
  .service-icon-wrap .service-icon-img {
    width: 1.7rem;
    height: 1.7rem;
  }
}

/* ── Service title alignment (mobile only centered) ───────────── */
.service-title {
  text-align: center;
}
@media (min-width: 640px) {
  .service-title {
    text-align: left;
  }
}
.service-desc {
  text-align: center;
}
@media (min-width: 640px) {
  .service-desc {
    text-align: left;
  }
}

/* ── Client logo container ───────────────────────────────────── */
.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  min-width: 230px;
  height: 132px;
  flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s;
}
.client-logo img {
  height: 82px !important;
  width: auto !important;
  max-width: 100%;
  object-fit: contain;
}
@media (min-width: 768px) {
  .client-logo img {
    height: 94px !important;
  }
}
.client-logo:hover {
  border-color: #ffcb05;
  box-shadow: inset 0 0 0 2px rgba(255,203,5,.38);
}

/* ── Clients marquee (smooth, GPU-friendly) ──────────────────── */
.clients-track {
  animation: clients-marquee 36s linear infinite;
  animation-play-state: paused;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}
.clients-track.is-ready {
  animation-play-state: running;
}
@keyframes clients-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
@media (hover: hover) {
  .clients-track:hover {
    animation-play-state: paused;
  }
}

/* ── Project thumb ───────────────────────────────────────────── */
.project-thumb {
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s;
}
.project-thumb:hover {
  box-shadow: 0 20px 48px rgba(0,0,0,.28);
}

/* ── Hamburger open state ────────────────────────────────────── */
#navbar {
  z-index: 1200;
}
#menu-toggle {
  position: relative;
  z-index: 1100;
}
#menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#menu-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile menu overlay state ───────────────────────────────── */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
}
#mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Active nav link ─────────────────────────────────────────── */
.nav-link.active { color: white; }
.nav-link.active::after { width: 100%; }

/* ── Lightbox ────────────────────────────────────────────────── */
#lightbox.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
