@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;900&family=Space+Grotesk:wght@300;400;500;600&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --bg-color: #050505;
  --surface-color: #0e0e0e;
  --surface-light: #161616;
  --text-primary: #f0f0f0;
  --text-secondary: #888888;
  --accent: #FF1E3C;
  --accent-hover: #ff3a54;
  --border-color: rgba(255, 255, 255, 0.08);
  
  --font-display: 'Syne', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
}

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

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display-font {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-transform: uppercase;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navbar --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: transform 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 26px;
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
}

.logo-gro {
  font-weight: 900;
  letter-spacing: -1px;
}

.logo-creative {
  font-weight: 300;
  letter-spacing: 0;
}

.logo-dot {
  color: var(--accent);
  font-weight: 900;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: var(--font-display);
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  display: inline-flex;
  gap: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 0 rgba(255, 30, 60, 0.4);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(255, 30, 60, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(255, 30, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 30, 60, 0); }
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  animation: shine 4s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  20% { left: 200%; }
  100% { left: 200%; }
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: #fff;
}

.btn-arrow {
  animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

.btn-primary:hover .btn-arrow {
  animation: arrowBounce 0.8s ease-in-out infinite;
}

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

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

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.3s ease;
}

.lang-btn:hover, .lang-btn.active {
  color: var(--text-primary);
  font-weight: 600;
}

.lang-divider {
  color: var(--border-color);
  font-size: 12px;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  background: var(--bg-color);
}

.scrolling-grid {
  display: flex;
  gap: 20px;
  width: 250vw;
  height: 250vh;
  transform: rotate(-10deg) translate(-15%, -25%);
  animation: fadeGridIn 2.5s ease-in-out forwards;
}

@keyframes fadeGridIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.grid-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 250px;
  flex-shrink: 0;
}

.grid-column img {
  width: 100%;
  border-radius: 8px;
  filter: grayscale(100%) brightness(0.4) contrast(1.2);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.grid-column.up {
  animation: scrollUp 100s linear infinite;
}

.grid-column.down {
  animation: scrollDown 100s linear infinite;
}

@keyframes scrollUp {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

@keyframes scrollDown {
  0% { transform: translateY(-50%); }
  100% { transform: translateY(0); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(5,5,5,0.4) 0%, rgba(5,5,5,0.85) 60%, rgba(5,5,5,1) 100%);
  z-index: 1;
}

.hero-content-centered {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  text-align: center;
}

.hero-text-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  padding: 0 20px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(36px, 4.5vw, 64px);
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero h1 span {
  display: block;
  color: var(--accent);
}

.hero p {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Infinite Marquee --- */
.marquee-section {
  padding: 30px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--surface-color);
  overflow: hidden;
  display: flex;
}

.marquee-content {
  display: flex;
  white-space: nowrap;
  animation: marquee 20s linear infinite;
}

.marquee-content span {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--border-color);
  margin: 0 20px;
  display: flex;
  align-items: center;
}

.marquee-content span::after {
  content: '✦';
  margin-left: 40px;
  color: var(--accent);
  font-size: 16px;
}

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

/* --- Portfolio Section --- */
.portfolio {
  padding: 120px 0;
}

.section-header {
  margin-bottom: 80px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-header h2 {
  font-size: clamp(40px, 5vw, 70px);
}

.section-header p {
  color: var(--text-secondary);
  max-width: 320px;
  font-size: 16px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.portfolio-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 9/16; /* Cambio a vertical */
  background: var(--surface-light);
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.portfolio-item .media-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(90deg, var(--surface-light) 25%, #222 50%, var(--surface-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.portfolio-item video,
.portfolio-item img,
.portfolio-item iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  pointer-events: none; /* Let clicks pass through */
  filter: grayscale(100%);
  transition: filter 0.4s ease;
  /* NO HAY HOVER DE ESCALA */
}

@media (max-width: 768px) {
  .portfolio-item video,
  .portfolio-item img,
  .portfolio-item iframe {
    filter: grayscale(0%);
  }
  
  .lightbox-content {
    width: 85vw !important;
    height: calc(85vw * 16 / 9) !important;
    max-height: 80vh !important;
    max-width: calc(80vh * 9 / 16) !important;
  }
  
  .lightbox-close {
    top: 15px !important;
    right: 15px !important;
  }
}

.portfolio-item:hover video,
.portfolio-item:hover img {
  filter: grayscale(0%);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  padding: 30px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 40%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h3 {
  font-size: 28px;
  margin-bottom: 5px;
}

.portfolio-overlay p {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-motion {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
  font-family: var(--font-body);
}

.portfolio-footer {
  margin-top: 60px;
  text-align: center;
}

/* --- Modal (Lightbox) --- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 3, 3, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  position: relative;
  width: 90%;
  max-width: 450px;
  aspect-ratio: 9/16;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.8);
  transform: scale(0.95);
  transition: transform 0.4s ease;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img, 
.lightbox-content video, 
.lightbox-content iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.lightbox-close:hover {
  background: var(--accent);
}

/* --- Process Section --- */
.process {
  padding: 120px 0;
  background: var(--surface-color);
}

.process-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 60px;
}

.process-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  align-items: start;
}

.process-item:last-child {
  border-bottom: 1px solid var(--border-color);
}

.process-item .num {
  font-size: 70px;
  color: var(--border-color);
  transition: color 0.3s ease;
}

.process-item:hover .num {
  color: var(--accent);
}

.process-item h3 {
  font-size: 28px;
  margin-bottom: 16px;
}

.process-item p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
}

/* --- Footer --- */
footer {
  padding: 160px 0 0;
  text-align: center;
}

.footer-desc {
  max-width: 500px;
  margin: 0 auto 60px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  padding: 0 20px;
}

.footer-cta {
  margin-bottom: 80px;
}

.footer-cta h2 {
  font-size: clamp(36px, 10vw, 120px);
  margin-bottom: 30px;
  line-height: 1.1;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 60px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  font-size: 14px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.social-links a:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 40px 60px;
  padding-right: 120px; /* Evita que el botón de WhatsApp lo tape */
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 14px;
}

/* --- WhatsApp Float --- */
.wa-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.2);
  z-index: 100;
  transition: transform 0.3s ease;
}

.wa-float:hover {
  transform: scale(1.1);
}

.wa-float svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-actions {
    justify-content: center;
  }
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .process-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .process-item .num {
    font-size: 40px;
  }
  footer {
    padding-top: 100px;
    padding-bottom: 0;
  }
  .footer-cta {
    margin-top: 40px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    padding-bottom: 80px;
  }
}

/* --- Mobile Hover Fallback (Pulse Effect) --- */
@media (hover: none) {
  @keyframes colorPulse {
    0% { filter: grayscale(100%); }
    10%, 90% { filter: grayscale(0%); }
    100% { filter: grayscale(100%); }
  }

  .portfolio-item video,
  .portfolio-item img {
    animation: colorPulse 6s infinite ease-in-out;
  }
  
  /* Stagger the animation so they don't all pulse at the same time */
  .portfolio-item:nth-child(even) video,
  .portfolio-item:nth-child(even) img {
    animation-delay: 3s;
  }
}
