/* ─── RESET & BASE ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #080808;
  --dark:    #0f0f0f;
  --panel:   #141414;
  --border:  rgba(255,255,255,0.06);
  --accent:  #e63946;       /* red */
  --accent2: #b01020;       /* dark red */
  --white:   #f5f5f0;
  --muted:   rgba(245,245,240,0.45);
  --font-display: 'Bebas Neue', sans-serif;
  --font-serif:   'Playfair Display', serif;
  --font-body:    'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

/* ─── CUSTOM CURSOR ────────────────────────────────────── */
#cursor {
  position: fixed; top: 0; left: 0; z-index: 9999;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease, width 0.25s ease, height 0.25s ease, background 0.25s ease;
  mix-blend-mode: difference;
}
#cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 9998;
  width: 38px; height: 38px;
  border: 1px solid rgba(232,199,109,0.5);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}
body.hovering #cursor { width: 6px; height: 6px; background: var(--accent); }
body.hovering #cursor-ring { width: 56px; height: 56px; opacity: 0.7; }

/* ─── SCROLLBAR ────────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ─── NAV ──────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 60px;
  mix-blend-mode: normal;
  background: transparent;
  backdrop-filter: none;
  transition: background 0.4s, padding 0.4s, backdrop-filter 0.4s;
}
nav.scrolled {
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(16px);
  padding: 16px 60px;
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.12em;
  color: var(--white);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.logo-ia   { display: none; }
body.mode-ia .logo-films { display: none; }
body.mode-ia .logo-ia   { display: inline; }
.nav-links {
  display: flex; gap: 40px; list-style: none;
}
.nav-links a {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--white); }
.nav-cta {
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--black); background: var(--accent);
  padding: 10px 22px; border: none; cursor: none;
  font-family: var(--font-body); font-weight: 600;
  transition: background 0.3s, transform 0.2s;
  text-decoration: none;
}
.nav-cta:hover { background: #f5d98a; transform: translateY(-1px); }

/* ─── HERO ─────────────────────────────────────────────── */
#hero-wrap {
  position: relative;
  height: 100vh;          /* sticky scroll container */
}
#hero {
  position: sticky;
  top: 0;
  width: 100%; height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden;
  will-change: transform;
}
#hero-video-wrap {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  transform-origin: center center;
  will-change: transform, opacity;
}
#hero-video-trad,
#hero-video-ia {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.9s ease;
}
#hero-video-trad { opacity: 1; }
#hero-video-ia   { opacity: 0; }
body.mode-ia #hero-video-trad { opacity: 0; }
body.mode-ia #hero-video-ia   { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(8,8,8,0.45) 0%,
    rgba(8,8,8,0.15) 40%,
    rgba(8,8,8,0.65) 100%
  );
  will-change: opacity;
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 0 20px;
}
.hero-eyebrow {
  font-size: 11px; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 24px;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.9s 0.3s forwards;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(72px, 11vw, 160px);
  line-height: 0.92;
  letter-spacing: 0.04em;
  color: var(--white);
  opacity: 0; transform: translateY(30px);
  animation: fadeUp 1s 0.5s forwards;
}
.hero-title em {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--accent);
  font-size: 0.55em;
  letter-spacing: 0.02em;
  display: block;
  line-height: 1.4;
}
.hero-sub {
  margin-top: 28px;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.9s 0.9s forwards;
}
.hero-cta-group {
  display: flex; gap: 16px; justify-content: center;
  margin-top: 48px;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.9s 1.1s forwards;
}
.btn-primary {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--black); background: var(--accent);
  padding: 14px 32px; font-weight: 600;
  text-decoration: none; transition: background 0.3s, transform 0.2s;
}
.btn-primary:hover { background: #f5d98a; transform: translateY(-2px); }
.btn-ghost {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--white); background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 14px 32px;
  text-decoration: none; transition: border-color 0.3s, color 0.3s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
/* ─── HERO SIDE MODE BUTTONS ───────────────────────────── */
.hero-side-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99;
  cursor: none;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(245,245,240,0.55);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 14px 26px;
  border-radius: 100vw;
  transition: color 0.3s, background 0.3s, border-color 0.3s, opacity 0.5s, transform 0.5s;
  user-select: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
  display: inline-block;
}
#btn-trad { left: 40px; }
#btn-ia   { right: 40px; }
.hero-side-btn:hover {
  color: var(--white);
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.35);
}
.hero-side-btn.active {
  color: var(--black);
  background: var(--accent);
  border-color: var(--accent);
}
body.mode-ia .hero-side-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--black);
}
.hero-side-btn.btn-scrolled {
  opacity: 0.35;
}
/* Ocultar el modo-gooey del nav (se deja en DOM para que gooeyActivate funcione) */
#mode-gooey { visibility: hidden; pointer-events: none; width: 0; overflow: hidden; }

.hero-scroll {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; animation: fadeUp 1s 1.5s forwards;
}
.hero-scroll span {
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--muted);
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s infinite;
}

/* ─── SECTIONS ──────────────────────────────────────────── */
section { padding: 120px 60px; }
.section-label {
  font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 80px);
  line-height: 0.95;
  letter-spacing: 0.03em;
}
.divider {
  width: 40px; height: 2px;
  background: var(--accent);
  margin: 28px 0;
}

/* ─── PORTFOLIO ─────────────────────────────────────────── */
#portfolio { background: var(--dark); }
.portfolio-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 60px;
}
.portfolio-header a {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  border-bottom: 1px solid var(--border); padding-bottom: 4px;
  transition: color 0.3s, border-color 0.3s;
}
.portfolio-header a:hover { color: var(--accent); border-color: var(--accent); }
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(240px, auto);
  gap: 20px;
}
.card {
  position: relative; overflow: hidden;
  background: var(--panel);
  cursor: none;
}
/* Grid: 6 cards — Burger King grande + 5 regulares */
.grid .card:nth-child(1) { grid-column: span 8; grid-row: span 2; }
.grid .card:nth-child(2) { grid-column: span 4; }
.grid .card:nth-child(3) { grid-column: span 4; }
.grid .card:nth-child(n+4) { grid-column: span 4; }

/* Burger King: imagen llena las 2 filas */
.grid .card:nth-child(1) .card-thumb { height: 100%; }
.grid .card:nth-child(1) .card-thumb img { height: 100%; width: 100%; object-fit: cover; }

.card-video-wrap {
  position: relative; padding-bottom: 56.25%;
  overflow: hidden;
}
.card-video-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: none;
}
.card-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(8,8,8,0.9) 0%, transparent 55%);
  transition: opacity 0.4s;
}
.card:hover .card-overlay { opacity: 0.4; }
.card-thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 16/9;
}
.card-thumb img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center center;
  transform: scale(1); transition: transform 0.6s ease;
  filter: brightness(0.85);
}
.card-thumb img.thumb-letterboxed {
  transform: scale(1.35);
}
.card:hover .card-thumb img { transform: scale(1.05); filter: brightness(1); }
.card:hover .card-thumb img.thumb-letterboxed { transform: scale(1.4); }
.card-info {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
  padding: 24px;
}
.card-tag {
  font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.card-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 32px);
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--white);
}
/* Placeholder cards */
.card-placeholder {
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 12px;
  padding: 60px 24px;
  border: 1px dashed var(--border);
}
.card-placeholder-icon {
  width: 48px; height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.card-placeholder p {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); text-align: center;
}

/* ─── PLAY BUTTON OVERLAY ───────────────────────────────── */
.play-overlay {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,8,8,0.0);
  transition: background 0.3s;
}
.play-btn {
  width: 64px; height: 64px;
  border: 2px solid rgba(255,255,255,0.8);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transform: scale(0.85);
  transition: transform 0.3s, border-color 0.3s, background 0.3s;
}
.play-btn svg { margin-left: 4px; }
.card:hover .play-overlay { background: rgba(8,8,8,0.2); }
.card:hover .play-btn {
  transform: scale(1);
  border-color: var(--accent);
  background: rgba(232,199,109,0.15);
}

/* ─── LIGHTBOX ──────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.94);
  align-items: center; justify-content: center;
}
#lightbox.active { display: flex; }
.lightbox-inner {
  position: relative; width: 90vw; max-width: 1100px;
}
.lightbox-video {
  position: relative; padding-bottom: 56.25%;
}
.lightbox-video iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: none;
}
.lightbox-close {
  position: absolute; top: -48px; right: 0;
  font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--muted); background: none; border: none;
  cursor: none; transition: color 0.3s;
}
.lightbox-close:hover { color: var(--white); }

/* ─── SERVICIOS ─────────────────────────────────────────── */
#servicios { background: var(--black); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 60px;
}
.service-item {
  background: var(--black);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}
.service-item:hover { background: var(--panel); }
.service-item .pixel-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.3s;
}
.service-item > *:not(.pixel-canvas) { position: relative; z-index: 1; }
.service-num {
  font-family: var(--font-display);
  font-size: 13px; letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 24px;
}
.service-name {
  font-family: var(--font-display);
  font-size: 32px; letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.service-desc {
  font-size: 14px; color: var(--muted); line-height: 1.8;
}
.service-icon {
  width: 32px; height: 2px;
  background: var(--accent);
  margin-bottom: 28px;
  transition: width 0.4s;
}
.service-item:hover .service-icon { width: 56px; }

/* ─── NOSOTROS ──────────────────────────────────────────── */
#nosotros {
  background: var(--dark);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-visual {
  position: relative;
}
.about-img-frame {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}
.about-img-frame::before {
  content: '';
  position: absolute; top: -16px; left: -16px;
  width: 100%; height: 100%;
  border: 1px solid var(--accent);
  z-index: 0;
}
.about-img-frame video,
.about-img-frame .about-placeholder {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
}
.about-img {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.5s ease;
}
.about-img-ia { display: none; }
body.mode-ia .about-img-trad { display: none; }
body.mode-ia .about-img-ia   { display: block; }
.about-stat-badge {
  position: absolute; bottom: -24px; right: -24px; z-index: 2;
  background: var(--accent);
  padding: 28px;
  color: var(--black);
}
.about-stat-num {
  font-family: var(--font-display);
  font-size: 48px; line-height: 1;
}
.about-stat-label {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  margin-top: 4px;
}
.about-content { padding: 20px 0; }
.about-body {
  color: var(--muted); font-size: 15px; line-height: 1.85;
  margin-bottom: 20px;
}
.about-body strong { color: var(--white); font-weight: 500; }
.about-tags {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 36px;
}
.about-tag {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: border-color 0.3s, color 0.3s;
}
.about-tag:hover { border-color: var(--accent); color: var(--accent); }

/* ─── EQUIPO ────────────────────────────────────────────── */
#equipo {
  background: var(--black);
  padding: 100px 0 0;
  overflow: hidden;
}
#equipo .section-label,
#equipo .section-title { text-align: center; padding: 0 60px; }
#equipo .section-title { margin-bottom: 0; }
#team-gallery {
  width: 100%;
  height: 600px;
  margin-top: 40px;
  cursor: grab;
}
#team-gallery:active { cursor: grabbing; }
#team-gallery canvas { display: block; }
@media (max-width: 768px) {
  #equipo { padding: 80px 0 0; }
  #equipo .section-label, #equipo .section-title { padding: 0 24px; }
  #team-gallery { height: 420px; }
}

/* ─── OBRAS BANNER ─────────────────────────────────────── */
.obras-banner-section {
  width: 100%;
  display: block;
  overflow: hidden;
  line-height: 0;
}
.obras-banner-section img {
  width: 100%;
  display: block;
  object-fit: cover;
}
/* Banner OBRAS — B&W en Films, azul en IA */
.obras-banner-section .obras-img-ia   { display: none; }
.obras-banner-section .obras-img-trad { display: block; }
body.mode-ia .obras-banner-section .obras-img-trad { display: none; }
body.mode-ia .obras-banner-section .obras-img-ia   { display: block; }

/* ─── CLIENTES ──────────────────────────────────────────── */
#clientes {
  background: var(--black);
  padding: 80px 60px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.clients-label {
  font-size: 10px; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--muted); text-align: center; margin-bottom: 48px;
}
.clients-row {
  display: flex; align-items: center; justify-content: center;
  gap: 48px 64px; flex-wrap: wrap;
}
.client-name {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 28px);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--white);
  display: inline-block;
  opacity: 0;
  will-change: opacity, filter;
}
.client-name:hover { color: var(--accent); }

/* ─── GLITCH TEXT ─── */
.client-name {
  position: relative;
  cursor: pointer;
}
.client-name::after,
.client-name::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  color: var(--white);
  background-color: var(--black);
  overflow: hidden;
  clip-path: inset(0 0 0 0);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

/* ─── CONTACTO ──────────────────────────────────────────── */
#contacto {
  background: var(--dark);
  text-align: center;
  position: relative;
}
/* ─── CONTACT LAYOUT (mapa + info) ─────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  max-width: 1060px;
  margin: 56px auto 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative; z-index: 1;
  text-align: left;
}
/* Map */
.contact-map-wrap {
  position: relative;
  height: 460px;
  overflow: hidden;
}
.contact-map-frame {
  width: 100%; height: 100%;
  border: none; display: block;
  filter: grayscale(1) contrast(1.1) brightness(0.55);
  transition: filter 0.6s ease;
}
body.mode-ia .contact-map-frame {
  filter: grayscale(1) contrast(1.15) brightness(0.45) hue-rotate(185deg);
}
/* Fade de mapa → panel */
.contact-map-wrap::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, transparent 55%, var(--panel) 100%);
}
/* Info panel */
.contact-info-panel {
  background: var(--panel);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  border-left: 1px solid var(--border);
}
/* Address block */
.ci-address-label {
  display: block;
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
  transition: color 0.4s;
}
.ci-address-text {
  font-family: var(--font-display);
  font-size: 21px; letter-spacing: 0.04em; line-height: 1.3;
  color: var(--white); margin: 0;
}
/* Divider */
.ci-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}
/* Persons */
.ci-persons { display: flex; flex-direction: column; gap: 24px; }
.ci-person-name {
  font-family: var(--font-display);
  font-size: 17px; letter-spacing: 0.08em;
  color: var(--white); display: block; margin-bottom: 2px;
}
.ci-person-role {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); display: block; margin-bottom: 10px;
}
.ci-person-links { display: flex; flex-direction: column; gap: 7px; }
.ci-link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-size: 12px; letter-spacing: 0.05em;
  font-family: 'Share Tech Mono', monospace;
  color: rgba(245,245,240,0.5);
  transition: color 0.25s;
  cursor: none;
}
.ci-link svg { opacity: 0.5; flex-shrink: 0; transition: opacity 0.25s; }
.ci-link:hover { color: var(--accent); }
.ci-link:hover svg { opacity: 1; }
.ci-person + .ci-person {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.contact-socials {
  display: flex; gap: 32px; justify-content: center;
  margin-top: 48px;
}
.social-link {
  font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  transition: color 0.3s;
}
.social-link:hover { color: var(--accent); }

/* ─── FOOTER ────────────────────────────────────────────── */
footer {
  background: var(--black);
  border-top: 1px solid var(--border);
  padding: 32px 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 17px; letter-spacing: 0.12em;
  color: var(--muted);
}
.footer-logo span { color: var(--accent); }
.footer-copy {
  font-size: 11px; color: rgba(245,245,240,0.2);
  letter-spacing: 0.08em;
}
.footer-yt {
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  transition: color 0.3s;
}
.footer-yt:hover { color: var(--accent); }

/* ─── ANIMATIONS ────────────────────────────────────────── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.reveal {
  opacity: 0; transform: translateY(36px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* ─── MODE TOGGLE ─── */
/* ── GooeyNav — mode toggle ── */
:root {
  --linear-ease: linear(
    0, 0.068, 0.19 2.7%, 0.804 8.1%, 1.037,
    1.199 13.2%, 1.245, 1.27 15.8%, 1.274,
    1.272 17.4%, 1.249 19.1%, 0.996 28%,
    0.949, 0.928 33.3%, 0.926, 0.933 36.8%,
    1.001 45.6%, 1.013, 1.019 50.8%,
    1.018 54.4%, 1 63.1%, 0.995 68%,
    1.001 85%, 1
  );
}
.gooey-nav-container {
  position: relative;
  /* Recorta el fondo negro del efecto gooey para que no se desborde hacia abajo */
  clip-path: inset(-120px -300px -8px -300px);
}
.gooey-nav-container nav {
  display: flex;
  position: relative;
  transform: translate3d(0,0,0.01px);
}
.gooey-nav-container nav ul {
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 3;
}
.gooey-nav-container nav ul li {
  border-radius: 100vw;
  position: relative;
  cursor: none;
  transition: color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 0.5px 1.5px transparent;
  color: var(--muted);
}
.gooey-nav-container nav ul li a {
  display: inline-block;
  padding: 7px 18px;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}
.gooey-nav-container nav ul li::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100vw;
  background: var(--accent);
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s var(--linear-ease);
  z-index: -1;
}
.gooey-nav-container nav ul li.active {
  color: var(--black);
}
.gooey-nav-container nav ul li.active::after {
  opacity: 1;
  transform: scale(1);
}
/* effect layers */
.gooey-nav-container .effect {
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 0;
  opacity: 1;
  pointer-events: none;
  display: grid;
  place-items: center;
  z-index: 1;
}
.gooey-nav-container .effect.text {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  transition: color 0.3s ease;
  z-index: 5;
}
.gooey-nav-container .effect.text.active { color: var(--black); }
.gooey-nav-container .effect.filter {
  filter: blur(7px) contrast(100) blur(0);
  mix-blend-mode: lighten;
  z-index: 2;
}
.gooey-nav-container .effect.filter::before {
  content: '';
  position: absolute;
  inset: -75px;
  z-index: -2;
  background: black;
}
.gooey-nav-container .effect.filter::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scale(0);
  opacity: 0;
  z-index: -1;
  border-radius: 100vw;
}
.gooey-nav-container .effect.active::after {
  animation: gnav-pill 0.3s var(--linear-ease) both;
}
.gnav-particle, .gnav-point {
  display: block;
  opacity: 0;
  width: 20px; height: 20px;
  border-radius: 100%;
  transform-origin: center;
}
.gnav-particle {
  --time: 5s;
  position: absolute;
  top: calc(50% - 8px);
  left: calc(50% - 8px);
  animation: gnav-particle-anim calc(var(--time)) ease 1 -350ms;
}
.gnav-point {
  background: var(--color);
  opacity: 1;
  animation: gnav-point-anim calc(var(--time)) ease 1 -350ms;
}

/* ─── PIXEL TRANSITION OVERLAY ────────────────────────── */
#mode-overlay {
  position: fixed; inset: 0; z-index: 500;
  pointer-events: none;
  overflow: hidden;
}

/* ─── PORTFOLIO IA (oculto por defecto) ────────────────── */
#portfolio-ia   { display: none; background: var(--dark); position: relative; }
/* ── Dots IA ────────────────────────────────────────────── */
#dots-ia-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.ia-dot-p {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}
#portfolio-ia { position: relative; }
#portfolio-trad { display: block; }

/* Card IA placeholder futurista */
.ia-card-coming {
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: flex-end;
  padding: 28px;
  min-height: 240px;
  background: var(--panel);
  position: relative;
  overflow: hidden;
}
.ia-card-coming::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(0,229,255,0.04) 0%, transparent 60%),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(0,229,255,0.02) 40px, rgba(0,229,255,0.02) 41px),
    repeating-linear-gradient(0deg,  transparent, transparent 40px, rgba(0,229,255,0.02) 40px, rgba(0,229,255,0.02) 41px);
}
.ia-card-coming .ia-label {
  font-size: 9px; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
  position: relative;
}
.ia-card-coming .ia-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 36px);
  letter-spacing: 0.06em; line-height: 1;
  color: var(--white);
  position: relative;
}
.ia-card-coming .ia-status {
  position: absolute; top: 20px; right: 20px;
  font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--accent); opacity: 0.6;
  display: flex; align-items: center; gap: 6px;
}
.ia-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  animation: iaPulse 1.8s infinite;
}

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 20px 24px; }
  nav.scrolled { padding: 14px 24px; }
  .nav-links { display: none; }
  section { padding: 80px 24px; }
  #nosotros { grid-template-columns: 1fr; }
  .about-stat-badge { bottom: -16px; right: 16px; }
  .grid .card:nth-child(1) { grid-column: span 12; }
  .grid .card:nth-child(2), .grid .card:nth-child(3),
  .grid .card:nth-child(4), .grid .card:nth-child(5) { grid-column: span 6; }
  footer { flex-direction: column; gap: 12px; text-align: center; }
  .contact-big { font-size: 42px; }
  #clientes { padding: 60px 24px; }
  .clients-row { gap: 32px; }
}
@media (max-width: 580px) {
  .grid .card:nth-child(n) { grid-column: span 12; }
  .hero-title { font-size: 58px; }
}

/* ── Más trabajos — carrusel animado ── */
.more-label {
  padding: 0 var(--side-pad);
  margin: 48px 0 20px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.more-strip {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 var(--side-pad) 36px;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.more-strip::-webkit-scrollbar { display: none; }
.more-strip:active { cursor: grabbing; }
.more-strip .card {
  flex: 0 0 clamp(260px, 28vw, 400px);
  min-width: clamp(260px, 28vw, 400px);
}

/* ── Main nav — plain links ── */
#main-gooey { position: relative; }
#main-gooey .effect { display: none !important; }

/* ── Leer más en servicios ── */
.service-desc { display: none; }
.service-desc.visible { display: block; }
.leer-mas-btn {
  margin-top: 16px;
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 600;
  transition: opacity 0.2s;
}
.leer-mas-btn:hover { opacity: 0.7; }

/* Helper para accesibilidad y SEO sin alterar diseño visual */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reset de listas para elementos semánticos sin alterar diseño */
ul.clients-row {
  list-style: none;
  padding: 0;
  margin: 0;
}

