/* ========================================
   Evoip Soluciones - Layout moderno
   Inspirado en cobrasecops.com
   ======================================== */

:root {
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --bg-muted: #18181b;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --accent: #3b82f6;
  --accent-dim: rgba(59, 130, 246, 0.25);
  --accent-subtle: rgba(59, 130, 246, 0.08);
  --border: #27272a;
  --radius: 10px;
  --scroll-offset: 120px;
  --section-padding-y: clamp(4rem, 10vw, 7rem);
  --section-padding-x: clamp(1.5rem, 4vw, 2.5rem);
  --content-max: 1100px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--scroll-offset);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a {
  text-decoration: none;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: var(--radius);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid white;
  outline-offset: 2px;
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* ========================================
   Nav
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  padding-top: calc(1rem + env(safe-area-inset-top));
  transition: background 0.2s;
}

.nav.scrolled {
  background: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--section-padding-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 36px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.3)) drop-shadow(0 0 10px rgba(59, 130, 246, 0.15));
  transition: filter 0.3s ease;
}

.logo:hover img {
  filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.4)) drop-shadow(0 0 14px rgba(59, 130, 246, 0.2));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.active {
  color: var(--accent);
}

.btn-nav {
  background: var(--accent);
  color: var(--bg) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.btn-nav:hover {
  opacity: 0.9;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.nav-overlay.open {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* ========================================
   Hero
   ======================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(5rem, 12vw, 8rem) var(--section-padding-x) clamp(5rem, 10vw, 7rem);
  padding-bottom: calc(clamp(5rem, 10vw, 7rem) + env(safe-area-inset-bottom));
  overflow: hidden;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(10, 10, 11, 0.88) 0%, rgba(10, 10, 11, 0.8) 40%, rgba(10, 10, 11, 0.84) 60%, rgba(10, 10, 11, 0.92) 100%),
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-dim), transparent 60%),
    radial-gradient(ellipse 70% 45% at 50% 100%, var(--accent-dim), transparent 55%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-label {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 0.35em;
}

.hero-title-static { display: inline; }

.hero-rotate {
  display: inline-block;
  position: relative;
  overflow: hidden;
  vertical-align: bottom;
  font-style: normal;
  min-width: 1ch;
  min-height: 1.2em;
}

.hero-rotate .rotate-word {
  display: inline-block;
  color: var(--accent);
  animation: rotateIn 0.5s ease both;
}

.hero-rotate .rotate-word.out {
  animation: rotateOut 0.35s ease both;
  position: absolute;
  left: 0;
  top: 0;
}

@keyframes rotateIn {
  0% { opacity: 0; transform: translateY(100%); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes rotateOut {
  0% { opacity: 1; transform: translateY(0); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-100%); filter: blur(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-rotate .rotate-word { animation: none; }
  .hero-rotate .rotate-word.out { display: none; animation: none; }
  .hero-slide { transition: none; }
}

.hero-subtitle {
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.75rem;
}

.hero-cta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text-muted);
}

.btn-whatsapp {
  background: #25d366 !important;
  color: white !important;
}

.btn-whatsapp:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.98);
}

/* ========================================
   Sections
   ======================================== */

.section {
  padding: var(--section-padding-y) var(--section-padding-x);
  scroll-margin-top: var(--scroll-offset);
}

section[id] {
  scroll-margin-top: var(--scroll-offset);
}

.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.section-tag {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 0.75rem;
}

.section-inner > .section-tag + h2 {
  margin-top: 0;
}

/* ========================================
   Nosotros / Quiénes somos
   ======================================== */

.nosotros {
  background: var(--bg);
}

.nosotros-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.nosotros-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem 0;
}

.nosotros-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.nosotros-content p:last-child {
  margin-bottom: 0;
}

.nosotros-content strong {
  color: var(--text);
  font-weight: 600;
}

.nosotros-visual {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.nosotros-visual img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: contain;
}

.nosotros-logo {
  max-width: 280px;
  filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.2)) drop-shadow(0 0 40px rgba(59, 130, 246, 0.1));
}

.nosotros-content {
  max-width: 680px;
  margin: 0 auto;
}

/* ========================================
   Services
   ======================================== */

.services {
  background: var(--bg);
}

.services-intro {
  margin-bottom: 2.5rem;
  text-align: center;
}

.services-intro h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.service-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.service-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  opacity: 0.9;
}

.service-card-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 50%;
  margin-bottom: 1.25rem;
}

.service-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.services-cta {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.services-cta p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* ========================================
   Portfolio
   ======================================== */

.portfolio {
  background: var(--bg-elevated);
}

.portfolio .section-inner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.portfolio .section-tag {
  margin-bottom: 0.25rem;
}

.portfolio-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.portfolio-lead {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
}

.portfolio-cta {
  text-align: center;
  padding-top: 1rem;
}

.portfolio-cta p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.portfolio-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.portfolio-item:hover {
  transform: translateY(-2px);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
  transition: filter 0.3s ease, transform 0.4s ease;
}

.portfolio-item-la-union img {
  object-position: center 70%;
}

.portfolio-item:hover img {
  filter: brightness(0.55);
  transform: scale(1.03);
}

.portfolio-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
  pointer-events: none;
}

.portfolio-item-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  pointer-events: none;
}

.portfolio-item-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.portfolio-item-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

/* ========================================
   Proceso (Cómo trabajamos)
   ======================================== */

.proceso {
  background: var(--bg);
}

.proceso-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.proceso-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.proceso-step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.proceso-step:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.proceso-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 50%;
  margin-bottom: 1rem;
}

.proceso-step h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.proceso-step p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .proceso-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .proceso-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ========================================
   Caso de éxito (página individual)
   ======================================== */

.caso-hero {
  padding: calc(6rem + env(safe-area-inset-top)) var(--section-padding-x) 3rem;
  background: var(--bg);
}

.caso-hero-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.caso-back {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.caso-back:hover {
  color: var(--accent);
}

.caso-tag {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.caso-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 1rem;
}

.caso-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.caso-hero-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: var(--content-max);
  margin: 2rem auto 0;
}

.caso-hero-img {
  max-width: var(--content-max);
  margin: 2rem auto 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.caso-hero-imgs .caso-hero-img {
  margin: 0;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.caso-hero-imgs .caso-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.caso-hero-img img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0.9);
}

.caso-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem var(--section-padding-x) 4rem;
}

.caso-section {
  margin-bottom: 2.5rem;
}

.caso-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.caso-section p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}

.caso-alcance {
  margin: 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.caso-alcance li {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}

.caso-details {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.caso-obra-terminada {
  margin-top: 2rem;
}

.caso-details h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.caso-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.caso-meta-item dt {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.caso-meta-item dd {
  font-size: 0.95rem;
  margin: 0;
}

.caso-cta {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.caso-cta p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.caso-gallery-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.caso-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.caso-gallery img,
.caso-hero-img.caso-gallery-trigger {
  cursor: pointer;
}

.caso-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Lightbox galería */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .caso-hero {
    padding-top: calc(5rem + env(safe-area-inset-top));
  }
  .caso-hero-imgs {
    grid-template-columns: 1fr;
  }

  .caso-meta {
    grid-template-columns: 1fr;
  }

  .caso-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .caso-gallery {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Clients marquee
   ======================================== */

.clients {
  background: var(--bg);
  overflow: hidden;
}

.clients .section-inner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.clients .section-tag {
  margin-bottom: 0.25rem;
}

.clients h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.clients-marquee {
  overflow: hidden;
  padding: 1rem 0;
  margin-top: 1.5rem;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.clients-track {
  display: flex;
  gap: 1.25rem;
  animation: marquee 35s linear infinite;
}

.client-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  padding: 0 0.75rem;
}

.client-item img {
  max-height: 80px;
  max-width: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.client-item:hover img {
  opacity: 1;
}

.client-fallback {
  display: none;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .clients-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}

/* Logo con color (agregar class="client-item client-logo-color" en el HTML si querés) */
.client-item.client-logo-color img {
  filter: none;
  opacity: 0.85;
}

/* ========================================
   Contact
   ======================================== */

.contact {
  background: var(--bg-elevated);
  padding-top: clamp(3rem, 7vw, 5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.contact .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.contact-lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 2rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
  max-width: 900px;
}

.contact-card {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--accent);
}

.contact-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.contact-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.contact-card .btn {
  margin-top: auto;
}

.contact-card a:not(.btn) {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.contact-card > a:not(.btn) {
  word-break: break-all;
}

.contact-card a:not(.btn):hover {
  color: var(--accent);
}

.contact-card-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: auto;
}

.contact-card-links a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.contact-card-links a:hover {
  color: var(--accent);
}

/* ========================================
   FAB WhatsApp (flotante con brillo)
   ======================================== */

.fab-whatsapp {
  display: flex;
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  right: calc(1.5rem + env(safe-area-inset-right));
  z-index: 900;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 0 rgba(37, 211, 102, 0.6),
    0 4px 20px rgba(37, 211, 102, 0.5),
    0 0 40px rgba(37, 211, 102, 0.3);
  animation: fabPulse 2s ease-in-out infinite;
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

@keyframes fabPulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(37, 211, 102, 0.6),
      0 4px 20px rgba(37, 211, 102, 0.5),
      0 0 40px rgba(37, 211, 102, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 15px rgba(37, 211, 102, 0),
      0 4px 25px rgba(37, 211, 102, 0.6),
      0 0 55px rgba(37, 211, 102, 0.4);
  }
}

.fab-whatsapp:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 0 0 rgba(37, 211, 102, 0.4),
    0 6px 28px rgba(37, 211, 102, 0.6),
    0 0 60px rgba(37, 211, 102, 0.5);
  animation: none;
}

.fab-whatsapp:active {
  transform: scale(0.95);
}

.fab-whatsapp svg {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .fab-whatsapp {
    animation: none;
  }
}

/* ========================================
   Footer
   ======================================== */

.footer {
  padding: clamp(2.5rem, 6vw, 4rem) var(--section-padding-x);
  padding-bottom: calc(clamp(2rem, 4vw, 2.5rem) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 3.5rem;
  align-items: start;
}

.footer-brand {
  max-width: 280px;
}

.footer-logo-img {
  height: 32px;
  width: auto;
  display: block;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.25)) drop-shadow(0 0 10px rgba(59, 130, 246, 0.12));
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contact a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: var(--accent);
}

.footer-copy {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.8;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  margin-top: 0;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-brand {
    max-width: none;
  }

  .footer-logo-img {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-nav,
  .footer-contact {
    align-items: center;
  }
}

/* ========================================
   Animations
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(16px);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
  }

  .fade-in.visible {
    transition: none;
  }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(280px, 85vw);
    max-width: 280px;
    background: var(--bg-elevated);
    flex-direction: column;
    align-items: stretch;
    padding: calc(5rem + env(safe-area-inset-top)) 1.5rem 2rem;
    padding-top: calc(5rem + env(safe-area-inset-top));
    gap: 0;
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateX(0);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 1rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
  }

  .hero {
    padding-top: calc(4.5rem + env(safe-area-inset-top));
    padding-left: var(--section-padding-x);
    padding-right: var(--section-padding-x);
  }

  .hero-title {
    font-size: clamp(1.9rem, 7vw, 2.4rem);
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section {
    padding: clamp(3rem, 8vw, 4.5rem) var(--section-padding-x);
  }

  .section-inner {
    padding: 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .service-card {
    padding: 1.5rem;
  }

  .services-intro {
    margin-bottom: 2rem;
  }

  .services-intro h2 {
    font-size: clamp(1.6rem, 5vw, 2rem);
  }

  .portfolio .section-inner,
  .clients .section-inner {
    gap: 0.25rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .clients h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .clients-track span {
    font-size: 1rem;
  }

  .contact-title {
    font-size: 1.5rem;
  }

  .contact-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 360px;
  }

  .contact-card {
    padding: 1.25rem;
  }

  .contact-card .btn,
  .contact-card-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    min-width: 0;
  }
}
