/* =========================================================
   XPERIENCE LAB — Design System
   Neon Futurism / High-Gloss Tech
   ========================================================= */

:root {
  /* Brand palette */
  --jet-black: #000000;
  --azure-blue: #2490FF;
  --wild-orchid: #BC29FF;
  --cyan-blue: #00E5FF;
  --chalk-white: #F0F0F0;

  /* Derived surfaces */
  --bg-elevated: #0d0e15;
  --bg-card: rgba(255, 255, 255, 0.06);
  --border-soft: rgba(240, 240, 240, 0.15);
  --border-glow: rgba(0, 229, 255, 0.4);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--cyan-blue), var(--azure-blue) 55%, var(--wild-orchid));
  --gradient-text: linear-gradient(90deg, var(--cyan-blue), var(--azure-blue) 50%, var(--wild-orchid));

  /* Video showcase accent (cyberpunk cyan/magenta) */
  --neon-cyan: #00f2fe;
  --neon-magenta: #f72585;

  /* Typography */
  --font-main: 'Montserrat', sans-serif;

  /* Layout */
  --container-max: 1200px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================== RESET =========================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: #0a0b12;
  background-image:
    radial-gradient(620px circle at 12% 18%, rgba(0, 229, 255, 0.20), transparent 62%),
    radial-gradient(680px circle at 88% 8%, rgba(188, 41, 255, 0.18), transparent 62%),
    radial-gradient(640px circle at 82% 62%, rgba(36, 144, 255, 0.18), transparent 64%),
    radial-gradient(580px circle at 8% 68%, rgba(0, 229, 255, 0.16), transparent 62%),
    radial-gradient(600px circle at 50% 95%, rgba(188, 41, 255, 0.14), transparent 64%);
  background-repeat: repeat-y;
  background-size: 100% 1100px;
  background-position: top center;
  color: var(--chalk-white);
  font-family: var(--font-main);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan-blue);
  color: var(--jet-black);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* =========================== TYPOGRAPHY =========================== */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-blue);
  margin-bottom: 14px;
}

/* =========================== BUTTONS =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #04060a;
}

.btn-glow {
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.45), 0 0 40px rgba(188, 41, 255, 0.25);
}
.btn-glow:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 26px rgba(0, 229, 255, 0.65), 0 0 60px rgba(188, 41, 255, 0.45);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  color: var(--chalk-white);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  border-color: var(--cyan-blue);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
  transform: translateY(-2px);
}

.btn-lg { padding: 18px 42px; font-size: 1.05rem; }
.full-width { width: 100%; }

/* =========================== HEADER =========================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 18px 0;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}
.brand-name em {
  font-style: normal;
  font-weight: 300;
  color: var(--cyan-blue);
}

/* Despliegue del nombre de marca: cada letra "materializa" en secuencia */
.brand-name .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px) scale(0.85);
  filter: blur(3px);
}
.brand-name.is-revealed .letter {
  animation: letterReveal 0.55s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes letterReveal {
  0% { opacity: 0; transform: translateY(10px) scale(0.85); filter: blur(3px); }
  65% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.main-nav { margin-left: auto; }

.nav-list {
  display: flex;
  gap: 34px;
}

.nav-link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--chalk-white);
  opacity: 0.85;
  padding: 6px 0;
  transition: opacity 0.25s ease, color 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  box-shadow: 0 0 8px var(--cyan-blue);
  transition: width 0.3s var(--ease-out);
}
.nav-link:hover {
  opacity: 1;
  color: var(--cyan-blue);
}
.nav-link:hover::after { width: 100%; }

.header-cta { margin-left: 12px; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--chalk-white);
  transition: transform 0.3s var(--ease-out), opacity 0.3s ease, background 0.3s ease;
}
.hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--cyan-blue); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--cyan-blue); }

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease-out);
  background: rgba(5, 5, 8, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-soft);
}
.mobile-menu.is-open { max-height: 420px; }

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px 28px;
}
.mobile-nav-list .nav-link {
  display: block;
  padding: 10px 4px;
  font-size: 1rem;
}
.mobile-nav-list .btn { margin-top: 10px; }

/* =========================== HERO =========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 100px;
  overflow: hidden;
}

.hero-aura {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.hero-aura--cyan {
  width: 480px; height: 480px;
  background: var(--cyan-blue);
  top: -120px; left: -100px;
  animation: drift 14s ease-in-out infinite;
}
.hero-aura--azure {
  width: 520px; height: 520px;
  background: var(--azure-blue);
  bottom: -180px; right: -120px;
  animation: drift 18s ease-in-out infinite reverse;
}
.hero-aura--orchid {
  width: 420px; height: 420px;
  background: var(--wild-orchid);
  top: 30%; right: 15%;
  animation: drift 16s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.08); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 300;
  color: rgba(240, 240, 240, 0.78);
  max-width: 620px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--border-soft);
  border-radius: 20px;
  z-index: 1;
}
.scroll-indicator span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: var(--cyan-blue);
  box-shadow: 0 0 8px var(--cyan-blue);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { top: 8px; opacity: 1; }
  70% { top: 22px; opacity: 0; }
  100% { top: 8px; opacity: 0; }
}

/* =========================== SECTIONS =========================== */
.section {
  position: relative;
  padding: 120px 0;
}
.section--alt {
  background: linear-gradient(180deg, transparent, rgba(36, 144, 255, 0.05), transparent);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.section-desc {
  color: rgba(240, 240, 240, 0.7);
  font-weight: 300;
  font-size: 1.05rem;
}

/* =========================== GLASS CARD BASE =========================== */
.card, .portfolio-card, .cta-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), border-color 0.4s ease, box-shadow 0.4s ease;
}

/* =========================== SERVICE CARDS =========================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
}

.card {
  padding: 0;
  will-change: transform;
}
.card:hover {
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 229, 255, 0.15);
}

/* Render 3D flotante: imagen a sangre en la parte superior de la tarjeta,
   con un degradado que la funde hacia el cuerpo de texto. */
.card-media {
  position: relative;
  height: 150px;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.card:hover .card-media img { transform: scale(1.06); }
.card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 14, 21, 0) 35%, rgba(13, 14, 21, 0.92) 100%);
}

.card-glow {
  position: absolute;
  top: -10%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 1;
}
.card:hover .card-glow { opacity: 0.7; }
.card-glow--cyan { background: var(--cyan-blue); }
.card-glow--azure { background: var(--azure-blue); }
.card-glow--orchid { background: var(--wild-orchid); }

.card-body { padding: 28px; }

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.card-text {
  font-size: 0.92rem;
  font-weight: 300;
  color: rgba(240, 240, 240, 0.72);
  margin-bottom: 20px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-tags li {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  color: rgba(240, 240, 240, 0.8);
}

/* =========================== VIDEO SHOWCASE =========================== */
.video-showcase { position: relative; overflow: hidden; }

.video-stage {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
}

.video-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.video-glow--cyan {
  width: 380px;
  height: 380px;
  background: var(--neon-cyan);
  top: -70px;
  left: -60px;
  animation: drift 14s ease-in-out infinite;
}
.video-glow--magenta {
  width: 380px;
  height: 380px;
  background: var(--neon-magenta);
  bottom: -70px;
  right: -60px;
  animation: drift 16s ease-in-out infinite reverse;
}

.video-ambilight {
  position: absolute;
  inset: -12% -8%;
  z-index: 0;
  width: auto;
  height: auto;
  border-radius: 32px;
  filter: blur(46px) saturate(1.8) brightness(1.15);
  opacity: 0;
  transition: opacity 1s ease, transform 0.5s ease-out;
  pointer-events: none;
}
.video-ambilight.is-live {
  opacity: 0.9;
  transform: scale(var(--pulse-scale, 1));
}

/* Bordes direccionales: cada lado del video "derrama" su propio color hacia afuera,
   como un Ambilight/Hue Sync real, en vez de un solo resplandor uniforme. */
.ambilight-edges {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.5s ease-out;
  transform: scale(var(--pulse-scale, 1));
}
.ambilight-edges.is-live { opacity: 1; }

.edge {
  position: absolute;
  filter: blur(42px);
  transition: background 0.35s ease-out;
  border-radius: 50%;
}
.edge--top {
  top: -12%;
  left: 12%;
  right: 12%;
  height: 40%;
  background: var(--edge-top-color, transparent);
}
.edge--bottom {
  bottom: -12%;
  left: 12%;
  right: 12%;
  height: 40%;
  background: var(--edge-bottom-color, transparent);
}
.edge--left {
  left: -10%;
  top: 12%;
  bottom: 12%;
  width: 30%;
  background: var(--edge-left-color, transparent);
}
.edge--right {
  right: -10%;
  top: 12%;
  bottom: 12%;
  width: 30%;
  background: var(--edge-right-color, transparent);
}

.video-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
    linear-gradient(120deg, var(--neon-cyan), var(--neon-magenta)) border-box;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(0, 242, 254, 0.18),
    0 0 80px rgba(247, 37, 133, 0.14);
}

.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mute-toggle {
  position: absolute;
  bottom: 18px;
  right: 18px;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--chalk-white);
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
}
.mute-toggle:hover {
  transform: scale(1.08);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.45);
}
.mute-toggle svg { width: 20px; height: 20px; }
.mute-toggle .icon-unmuted { display: none; }
.mute-toggle.is-unmuted .icon-muted { display: none; }
.mute-toggle.is-unmuted .icon-unmuted { display: block; }

.video-cta {
  text-align: center;
  margin-top: 44px;
}

@media (max-width: 600px) {
  .video-frame { border-radius: 16px; }
  .mute-toggle { width: 44px; height: 44px; bottom: 12px; right: 12px; }
  .mute-toggle svg { width: 18px; height: 18px; }
  .video-glow { filter: blur(50px); }
}

/* =========================== METODO =========================== */

/* Línea de fibra óptica: recorre los 4 nodos y se ilumina con el scroll */
.method-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  height: 34px;
  margin-bottom: 24px;
}

.timeline-track,
.timeline-fill {
  position: absolute;
  top: 50%;
  left: 12.5%;
  height: 2px;
  transform: translateY(-50%);
}
.timeline-track {
  right: 12.5%;
  background: var(--border-soft);
}
.timeline-fill {
  width: 0%;
  max-width: 75%;
  background: var(--gradient-primary);
  box-shadow: 0 0 10px var(--cyan-blue), 0 0 20px var(--wild-orchid);
}

.timeline-node {
  position: relative;
  justify-self: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-soft);
  z-index: 1;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.timeline-node.is-active {
  background: var(--cyan-blue);
  border-color: var(--cyan-blue);
  box-shadow: 0 0 10px var(--cyan-blue), 0 0 26px var(--wild-orchid);
}
.timeline-node.is-scanning::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--cyan-blue);
  animation: nodeScan 0.7s ease-out;
}

@keyframes nodeScan {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

@media (max-width: 900px) {
  .method-timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline-track, .timeline-fill { left: 25%; }
  .timeline-track { right: 25%; }
  .timeline-fill { max-width: 50%; }
}

@media (max-width: 560px) {
  .method-timeline { display: none; }
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.method-step {
  position: relative;
  padding-left: 8px;
  border-left: 2px solid var(--border-soft);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.method-step:hover { border-left-color: var(--cyan-blue); }

/* En pantallas donde la línea horizontal se oculta, la propia tarjeta
   se convierte en el segmento de fibra óptica que se activa con el scroll. */
@media (max-width: 560px) {
  .method-step.is-active {
    border-left-color: var(--cyan-blue);
    box-shadow: -6px 0 16px -8px var(--cyan-blue);
  }
}

.method-number {
  display: block;
  font-size: 2.4rem;
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
  padding-left: 16px;
  animation: numberBlink 2.4s ease-in-out infinite;
}
.method-step:nth-child(2) .method-number { animation-delay: 0.3s; }
.method-step:nth-child(3) .method-number { animation-delay: 0.6s; }
.method-step:nth-child(4) .method-number { animation-delay: 0.9s; }

@keyframes numberBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.method-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  padding-left: 16px;
}

.method-text {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(240, 240, 240, 0.68);
  padding-left: 16px;
}

/* =========================== PORTFOLIO =========================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.portfolio-card { will-change: transform; }
.portfolio-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 30px rgba(188, 41, 255, 0.18);
}

.portfolio-media {
  position: relative;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(188, 41, 255, 0.12)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 14px);
  border-bottom: 1px solid var(--border-soft);
}

.portfolio-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Compare (antes/después) media variant */
.portfolio-media--compare {
  align-items: stretch;
  padding: 0;
  gap: 1px;
  background: var(--border-soft);
}

.compare-pane {
  position: relative;
  flex: 1;
  height: 100%;
  overflow: hidden;
  background: #f4f4f4;
}
.compare-pane img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #f4f4f4;
}
.compare-pane--after { background: #fff; }
.compare-pane--after img { background: #fff; }

.compare-label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(5, 5, 8, 0.75);
  color: var(--chalk-white);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Character showcase media variant */
.portfolio-media--character {
  position: relative;
  gap: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(0, 229, 255, 0.25), transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(188, 41, 255, 0.25), transparent 55%),
    linear-gradient(160deg, #11131c, #0a0b12);
}

.portfolio-media--character img.character-img {
  position: absolute;
  height: 165px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.5));
}
.portfolio-media--character img.character-img--main {
  left: 50%;
  transform: translateX(-68%);
  z-index: 2;
}
.portfolio-media--character img.character-img--secondary {
  left: 50%;
  transform: translateX(4%) scale(0.82);
  opacity: 0.85;
  z-index: 1;
}

.portfolio-body { padding: 28px; }

.portfolio-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--cyan-blue);
}

.portfolio-text {
  font-size: 0.88rem;
  font-weight: 300;
  color: rgba(240, 240, 240, 0.72);
  margin-bottom: 10px;
}
.portfolio-text strong { color: var(--chalk-white); font-weight: 600; }

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 12px 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cyan-blue);
  transition: gap 0.25s ease, color 0.25s ease;
}
.portfolio-link svg { width: 14px; height: 14px; transition: transform 0.25s ease; }
.portfolio-link:hover {
  color: var(--chalk-white);
  gap: 9px;
}
.portfolio-link:hover svg { transform: translate(2px, -2px); }

/* =========================== CTA FINAL =========================== */
.cta-section { padding-bottom: 160px; }

.cta-card {
  text-align: center;
  padding: 70px 40px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
    linear-gradient(120deg, var(--wild-orchid), var(--cyan-blue)) border-box;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 60px rgba(188, 41, 255, 0.15), 0 0 100px rgba(0, 229, 255, 0.1);
}

.cta-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin: 10px 0 18px;
}

.cta-text {
  max-width: 520px;
  margin: 0 auto 34px;
  color: rgba(240, 240, 240, 0.72);
  font-weight: 300;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

/* --- Variante dividida: globo de conexión + copy --- */
.cta-card--split {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  align-items: center;
  gap: 24px;
  text-align: left;
  padding: 48px;
}

.cta-card--split .cta-text { margin: 0 0 34px; }
.cta-card--split .cta-actions { justify-content: flex-start; }

.cta-visual {
  position: relative;
  aspect-ratio: 11 / 8;
}

.globe-svg { width: 100%; height: 100%; overflow: visible; }

.globe-outline {
  fill: none;
  stroke: rgba(0, 229, 255, 0.35);
  stroke-width: 1.5;
}

.globe-line {
  fill: none;
  stroke: rgba(240, 240, 240, 0.16);
  stroke-width: 1;
}

.signal-arc {
  fill: none;
  stroke: url(#arcGradient);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 6 7;
  opacity: 0.85;
  animation: dashFlow 1.4s linear infinite;
}

.signal-dot {
  fill: var(--chalk-white);
  filter: drop-shadow(0 0 6px var(--cyan-blue)) drop-shadow(0 0 12px var(--wild-orchid));
}

.node-core {
  filter: drop-shadow(0 0 8px currentColor);
}
.node-core--mx { fill: var(--cyan-blue); color: var(--cyan-blue); }
.node-core--br { fill: var(--wild-orchid); color: var(--wild-orchid); }

.node-ring {
  fill: none;
  stroke-width: 1.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: radarPing 2.6s ease-out infinite;
}
.node-ring--mx { stroke: var(--cyan-blue); }
.node-ring--br { stroke: var(--wild-orchid); }
.node-ring--delay { animation-delay: 1.3s; }

.globe-node {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--chalk-white);
  background: rgba(8, 8, 12, 0.65);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.globe-node--hq {
  background: rgba(188, 41, 255, 0.18);
  border-color: var(--wild-orchid);
}

/* Mapa de México (sede + ciudades) */
.mx-map-svg { width: 100%; height: 100%; overflow: visible; }

.mx-outline {
  fill: none;
  stroke: url(#arcGradient);
  stroke-width: 1.75;
  stroke-linejoin: round;
  opacity: 0.85;
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.35));
}

.mx-pin-core {
  fill: var(--cyan-blue);
  filter: drop-shadow(0 0 8px var(--cyan-blue));
}

.mx-pin-core--hq {
  fill: var(--wild-orchid);
  filter: drop-shadow(0 0 10px var(--wild-orchid));
}

.mx-pin-ring {
  fill: none;
  stroke: var(--cyan-blue);
  stroke-width: 1.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: radarPing 2.6s ease-out infinite;
}

.mx-pin-ring--hq {
  stroke: var(--wild-orchid);
  animation-duration: 2.2s;
}

.mx-pin-ring--delay { animation-delay: 1.1s; }

@keyframes dashFlow {
  to { stroke-dashoffset: -26; }
}

@keyframes radarPing {
  0% { r: 5; opacity: 0.8; }
  100% { r: 24; opacity: 0; }
}

@media (max-width: 800px) {
  .cta-card--split {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 28px;
  }
  .cta-card--split .cta-text { margin: 0 auto 30px; }
  .cta-card--split .cta-actions { justify-content: center; }
  .cta-visual { max-width: 340px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .signal-dot, .node-ring { animation: none; opacity: 0; }
  .signal-arc { animation: none; }
  .mx-pin-ring { animation: none; opacity: 0; }
}

/* =========================== FOOTER =========================== */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0;
  background: var(--bg-elevated);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav a {
  display: inline-block;
  padding: 10px 0;
  font-size: 0.88rem;
  color: rgba(240, 240, 240, 0.7);
  transition: color 0.25s ease;
}
.footer-nav a:hover { color: var(--cyan-blue); }

.footer-copy {
  font-size: 0.8rem;
  color: rgba(240, 240, 240, 0.45);
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

/* =========================== REVEAL ANIMATION =========================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================== RESPONSIVE =========================== */
@media (max-width: 900px) {
  .main-nav, .header-cta { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 600px) {
  .hero { padding: 120px 0 80px; }
  .section { padding: 80px 0; }
  .cta-card { padding: 48px 24px; }
  .footer-inner { justify-content: center; text-align: center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* Pines de las ciudades donde opera Xperience Lab (62 puntos + sede) */
.mx-pin {
  fill: var(--cyan-blue, #00E5FF);
  opacity: .55;
  transition: opacity .3s var(--ease-out);
}
.mx-pin:hover { opacity: 1; }
.mx-pins:hover .mx-pin { opacity: .8; }


/* === Pantallas muy angostas (iPhone SE y similares, <=360px) ===
   Medido en 320px: el nombre de marca se cortaba en "Xpe" y el eyebrow del hero
   se truncaba a la derecha. La culpa es del letter-spacing amplio + el gap del header. */
@media (max-width: 360px) {
  .header-inner { gap: 12px; }
  .brand { gap: 8px; min-width: 0; }
  .brand-name { font-size: 0.95rem; letter-spacing: 0; }
  .brand-mark { width: 34px; height: 34px; }
  .eyebrow { font-size: 0.68rem; letter-spacing: 0.08em; }
}
