/* ================================================================
   JUANPE AZKUNE - Estilos globales
   Paleta: Negro profundo + Dorado satinado + Blanco roto
   ================================================================ */

:root {
  /* Colores */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #161616;
  --bg-elevated: #1c1c1c;

  --gold: #c9a961;
  --gold-light: #e6c989;
  --gold-dark: #8a7234;
  --gold-soft: rgba(201, 169, 97, 0.15);

  --text-primary: #f5f5f0;
  --text-secondary: #b8b8b3;
  --text-muted: #7a7a75;

  --border: #2a2a2a;
  --border-gold: rgba(201, 169, 97, 0.25);

  /* Tipografía */
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Espaciado y layout */
  --container: 1200px;
  --container-narrow: 880px;
  --header-height: 80px;
  --radius: 4px;

  /* Transiciones */
  --t-fast: 0.2s ease;
  --t-base: 0.35s ease;
  --t-slow: 0.6s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fondo con sutil textura/gradiente */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at top, rgba(201, 169, 97, 0.04), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(201, 169, 97, 0.025), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--gold-light);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ================================================================
   TIPOGRAFÍA
   ================================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 500;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 1.2rem;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 12px;
}

.gold-text {
  color: var(--gold);
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold-light);
}

/* Eyebrow con efecto máquina de escribir (loop infinito) */
.eyebrow-typed .typed-word {
  display: inline-block;
  min-height: 1em;
  white-space: nowrap;
}

.eyebrow-typed .typed-cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--gold);
  font-weight: 400;
  animation: typed-blink 1s steps(1) infinite;
}

@keyframes typed-blink {
  50% { opacity: 0; }
}

/* ================================================================
   LAYOUT / CONTENEDORES
   ================================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: var(--container-narrow);
}

section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

section.compact {
  padding: 4rem 0;
}

.section-bg-alt {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header .subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--gold-light);
  max-width: 640px;
  margin: 0 auto;
}

/* Separador dorado */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem auto;
  max-width: 200px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.divider-icon {
  margin: 0 1rem;
  color: var(--gold);
  font-size: 0.8rem;
}

/* ================================================================
   HEADER / NAVEGACIÓN
   ================================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: border-color var(--t-base);
}

/* Fondo translúcido en pseudo-elemento para que el backdrop-filter
   no cree un containing block que afecte al menú móvil (position: fixed). */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: -1;
  pointer-events: none;
  transition: background var(--t-base);
}

.site-header.scrolled::before {
  background: rgba(10, 10, 10, 0.95);
}

.site-header.scrolled {
  border-bottom-color: var(--border-gold);
}

.nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  height: 50px;
  width: auto;
  transition: transform var(--t-base);
}

.brand:hover img {
  transform: scale(1.05);
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

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

.nav-link {
  position: relative;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 0;
  transition: color var(--t-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--t-base), left var(--t-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}

/* Hamburguesa móvil */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--gold);
  margin: 6px auto;
  transition: transform var(--t-base), opacity var(--t-base);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

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

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--bg-primary);
  background-image: url('assets/FotoPortada.png');
  background-size: auto 80%;
  background-position: 75% bottom;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(201, 169, 97, 0.06), transparent 70%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.60) 0%, rgba(10, 10, 10, 0.75) 60%, rgba(10, 10, 10, 0.92) 100%);
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(201, 169, 97, 0.015) 2px, rgba(201, 169, 97, 0.015) 4px);
  opacity: 0.5;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 24px;
  max-width: 900px;
}

.hero-logo {
  width: 180px;
  margin: 0 auto 2rem;
  filter: drop-shadow(0 8px 30px rgba(201, 169, 97, 0.25));
  animation: heroLogo 1.2s ease-out;
}

@keyframes heroLogo {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero h1 {
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--gold-light);
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  z-index: 2;
  animation: pulse 2.4s ease-in-out infinite;
}

.scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: var(--gold);
  margin: 12px auto 0;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Hero variantes (páginas internas) */
.page-hero {
  min-height: 50vh;
  padding-top: calc(var(--header-height) + 5rem);
  padding-bottom: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(201, 169, 97, 0.06), transparent 65%),
    linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
  z-index: 0;
}

.page-hero .container {
  z-index: 1;
}

.page-hero h1 {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.page-hero p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--gold-light);
  max-width: 640px;
  margin: 0 auto;
}

/* ================================================================
   BOTONES
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--bg-primary);
  border: 1px solid var(--gold);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(201, 169, 97, 0.3);
}

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

.btn-outline:hover {
  background: var(--gold-soft);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 12px 24px;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-arrow::after {
  content: '→';
  transition: transform var(--t-fast);
  font-size: 1.1rem;
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* ================================================================
   SECCIONES DE CONTENIDO
   ================================================================ */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.intro-grid .intro-text p {
  font-size: 1.05rem;
  line-height: 1.85;
}

.intro-portrait {
  position: relative;
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-tertiary));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-portrait::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid var(--gold-soft);
  pointer-events: none;
}

.intro-portrait img {
  width: 60%;
  opacity: 0.85;
  filter: drop-shadow(0 10px 30px rgba(201, 169, 97, 0.2));
}

.intro-portrait.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

/* Cards de habilidades / roles */
.role-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

/* Si solo hay 3 cards (página "Qué ofrezco") usamos 3 columnas en desktop. */
.role-grid:has(> :nth-child(3):last-child) {
  grid-template-columns: repeat(3, 1fr);
}

.role-card {
  padding: 2rem 1.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}

.role-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-100%);
  transition: transform var(--t-slow);
}

.role-card:hover {
  border-color: var(--border-gold);
  background: var(--bg-elevated);
  transform: translateY(-4px);
}

.role-card:hover::before {
  transform: translateX(0);
}

.role-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
}

.role-card h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.role-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

/* Quote / frase destacada */
.quote-section {
  text-align: center;
  padding: 5rem 0;
  position: relative;
}

.quote-section::before,
.quote-section::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: var(--gold);
}

.quote-section::before { top: 2rem; }
.quote-section::after { bottom: 2rem; }

.quote-mark {
  font-family: var(--font-serif);
  font-size: 5rem;
  color: var(--gold);
  line-height: 1;
  opacity: 0.4;
  margin-bottom: 1rem;
}

.quote-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.4;
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-primary);
}

/* ----- Vaporize text effect ----- */
.vaporize-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.vaporize-source {
  /* El texto original conserva su layout (espacio, wrapping)
     pero se vuelve visualmente transparente: lo dibujamos con
     partículas en el canvas superpuesto. */
  color: transparent !important;
  text-shadow: none !important;
  caret-color: transparent;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.vaporize-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.quote-author {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ================================================================
   "MI VISIÓN": Mapa del mundo de fondo + arcos animados
   El texto "Mi visión / El mundo cambió" se ve sobre un mapa del
   mundo en estilo puntos, con conexiones doradas animadas.
   ================================================================ */
.vision-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.vision-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Capa 1: mapa del mundo (SVG generado por dotted-map) */
.vision-map-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  opacity: 0.6;
  pointer-events: none;
}

.vision-map-container svg {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  /* Difumina los bordes superior/inferior para integrarlo con la sección */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
}

/* Capa 2: SVG con arcos y puntos animados */
.vision-arcs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Capa 3: oscurecimiento + viñeta para que el texto destaque */
.vision-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 45%, rgba(10, 10, 10, 0.72) 0%, rgba(10, 10, 10, 0.55) 60%, transparent 100%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.55) 0%, rgba(10, 10, 10, 0.35) 50%, rgba(10, 10, 10, 0.85) 100%);
  pointer-events: none;
  z-index: 2;
}

/* La SVG va por encima del oscurecimiento */
.vision-arcs { z-index: 3; }

/* Puntos pulsantes en ciudades */
.vision-arcs .vision-dot {
  fill: var(--gold-light);
  filter: drop-shadow(0 0 3px rgba(230, 201, 137, 0.9));
}

.vision-arcs .vision-pulse {
  fill: var(--gold);
  transform-origin: center;
  transform-box: fill-box;
  animation: vision-pulse 2.4s ease-out infinite;
}

@keyframes vision-pulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  100% { transform: scale(4.5);  opacity: 0;   }
}

/* Arcos curvos animados (dibujándose en bucle) */
.vision-arcs .vision-arc {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  filter: drop-shadow(0 0 2px rgba(201, 169, 97, 0.5));
  animation: vision-draw 5s ease-in-out infinite;
}

.vision-arcs .vision-arc.delay-1 { animation-delay: 0.8s; }
.vision-arcs .vision-arc.delay-2 { animation-delay: 1.6s; }
.vision-arcs .vision-arc.delay-3 { animation-delay: 2.4s; }

@keyframes vision-draw {
  0%   { stroke-dashoffset: 600;  opacity: 0; }
  10%  { opacity: 1; }
  55%  { stroke-dashoffset: 0;    opacity: 1; }
  80%  { stroke-dashoffset: 0;    opacity: 1; }
  100% { stroke-dashoffset: -600; opacity: 0; }
}

/* Contenedor del contenido por encima del fondo */
.vision-section > .container {
  position: relative;
  z-index: 5;
}

@media (prefers-reduced-motion: reduce) {
  .vision-arcs .vision-pulse,
  .vision-arcs .vision-arc {
    animation: none;
  }
  .vision-arcs .vision-arc { stroke-dashoffset: 0; }
}

/* Stats / cifras */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  text-align: center;
}

.stat-item {
  padding: 1.5rem 1rem;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Servicios / oferta */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.offer-card {
  padding: 2.5rem 2rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--t-base);
  display: flex;
  flex-direction: column;
}

.offer-card:hover {
  border-color: var(--border-gold);
  background: var(--bg-elevated);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.offer-num {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.offer-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.offer-card p {
  flex: 1;
  font-size: 0.95rem;
}

/* Lista con check dorado */
.gold-list {
  list-style: none;
  margin: 1.5rem 0;
}

.gold-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.gold-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 14px;
  height: 1px;
  background: var(--gold);
}

/* ================================================================
   PROYECTOS
   ================================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--t-base);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.project-image {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-primary));
  border-bottom: 1px solid var(--border-gold);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, var(--gold-soft), transparent 70%);
}

.project-image img {
  width: 80px;
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

.project-flag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  padding: 6px 12px;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: var(--radius);
  z-index: 2;
  backdrop-filter: blur(8px);
}

.project-body {
  padding: 2rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-region {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.project-card p {
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.project-tag {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
}

/* Eventos / equipo */
.events-block {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.event-pill {
  text-align: center;
  padding: 2rem 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--t-base);
}

.event-pill:hover {
  border-color: var(--gold);
  background: var(--bg-elevated);
}

.event-pill h4 {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.event-pill p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ================================================================
   CONTACTO / FORMULARIO
   ================================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  margin-bottom: 1.5rem;
}

.contact-info p {
  margin-bottom: 2rem;
}

.contact-list {
  list-style: none;
  margin-bottom: 2rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-list .label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  min-width: 80px;
}

.contact-list a {
  color: var(--text-primary);
  font-size: 1rem;
}

.contact-list a:hover {
  color: var(--gold);
}

.social-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all var(--t-base);
  text-decoration: none;
}

.social-icon:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Formulario */
.contact-form {
  padding: 2.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-form h3 {
  margin-bottom: 0.5rem;
}

.contact-form .form-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--t-fast), background var(--t-fast);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--bg-elevated);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.form-status {
  margin-top: 1rem;
  font-size: 0.88rem;
  min-height: 1.2em;
}

.form-status.success {
  color: var(--gold-light);
}

.form-status.error {
  color: #e07b7b;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-gold);
  padding: 4rem 0 2rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h5 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.footer-brand img {
  width: 80px;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: color var(--t-fast), padding-left var(--t-fast);
}

.footer-links a:hover {
  color: var(--gold);
  padding-left: 6px;
}

.footer-contact p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.footer-contact a {
  color: var(--text-secondary);
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ================================================================
   ANIMACIONES SCROLL (IntersectionObserver)
   ================================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
  .intro-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .intro-portrait {
    max-width: 420px;
    margin: 0 auto;
  }

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

  /* Tablet: 2x2 para tarjetas (más grandes). */
  .role-grid,
  .role-grid:has(> :nth-child(3):last-child),
  .events-block {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
}

@media (max-width: 560px) {
  /* Móvil: 1 columna. */
  .role-grid,
  .role-grid:has(> :nth-child(3):last-child),
  .events-block {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 720px) {
  section {
    padding: 4rem 0;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-list {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform var(--t-base);
  }

  .nav-list.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.2rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-bg {
    background-position: 65% bottom;
  }

  .scroll-hint {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-brand p {
    margin: 0 auto;
  }

  .social-row {
    justify-content: center;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  .contact-form {
    padding: 1.75rem;
  }

  .contact-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    width: 130px;
  }

  .quote-text {
    font-size: 1.3rem;
  }
}

/* ================================================================
   GALERÍA HORIZONTAL CON AUTOSCROLL
   - Pausa en hover para que se pueda mirar.
   - Overlay dorado sutil + borde dorado en hover.
   - Mask gradient en los lados para fade-out elegante.
   ================================================================ */
.gallery-section {
  padding: 6rem 0 5rem;
  overflow: hidden;
}

.gallery-viewport {
  position: relative;
  margin-top: 3rem;
  /* Scroll horizontal manual: el autoplay se mueve via JS y el usuario puede arrastrar */
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none; /* Firefox */
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto; /* el JS controla el desplazamiento; smooth puede romper el loop */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 7%,
    #000 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 7%,
    #000 93%,
    transparent 100%
  );
}

.gallery-viewport::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.gallery-viewport.dragging {
  cursor: grabbing;
}

.gallery-viewport.dragging .gallery-item {
  pointer-events: none; /* evita que un drag accidental abra el lightbox */
}

.gallery-track {
  display: flex;
  width: max-content;
}

.gallery-strip {
  display: flex;
  gap: 1.5rem;
  padding-right: 1.5rem;
  flex-shrink: 0;
}

.gallery-item {
  flex: 0 0 auto;
  width: 320px;
  height: 420px;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-elevated) 100%);
  position: relative;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
  cursor: zoom-in;
  outline: none;
}

.gallery-item:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.4);
}

/* Brillo dorado sutil interior */
.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(201, 169, 97, 0.08), transparent 65%);
  z-index: 1;
  pointer-events: none;
}

/* Degradado oscuro en la parte inferior para legibilidad del caption */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 10, 10, 0.85) 100%);
  z-index: 2;
  pointer-events: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s ease;
  position: relative;
  z-index: 0;
}

/* Cuando la imagen aún es el logo placeholder, lo centramos como ícono */
.gallery-item img[src*="logo.png"] {
  object-fit: contain;
  padding: 25%;
  opacity: 0.55;
  filter: drop-shadow(0 4px 20px rgba(201, 169, 97, 0.3));
}

.gallery-item:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 169, 97, 0.2);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 1.25rem;
  left: 1.5rem;
  right: 1.5rem;
  z-index: 3;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.gallery-caption::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 8px;
  transition: width 0.4s ease;
}

.gallery-item:hover .gallery-caption::before {
  width: 48px;
}

/* Variaciones sutiles de tono entre items para que el placeholder no se vea idéntico */
.gallery-strip > .gallery-item:nth-child(2n) {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-secondary) 100%);
}

.gallery-strip > .gallery-item:nth-child(3n) {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.gallery-strip > .gallery-item:nth-child(5n) {
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

@media (max-width: 720px) {
  .gallery-section {
    padding: 4rem 0 3.5rem;
  }

  .gallery-viewport {
    margin-top: 2.5rem;
    /* Mask más estrecho en móvil para que se vean más fotos sin desvanecerse */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
  }

  .gallery-item {
    width: 210px;
    height: 280px;
    border-radius: var(--radius-sm, 4px);
  }

  .gallery-strip {
    gap: 0.85rem;
    padding-right: 0.85rem;
  }

  /* Logo placeholder se ve grande relativo al tamaño reducido */
  .gallery-item img[src*="logo.png"] {
    padding: 22%;
    opacity: 0.6;
  }

  .gallery-caption {
    font-size: 0.95rem;
    bottom: 0.9rem;
    left: 1rem;
    right: 1rem;
    letter-spacing: 0.04em;
  }

  .gallery-caption::before {
    width: 18px;
    margin-bottom: 6px;
  }
}

@media (max-width: 480px) {
  .gallery-item {
    width: 175px;
    height: 235px;
  }

  .gallery-strip {
    gap: 0.7rem;
    padding-right: 0.7rem;
  }

  .gallery-item img[src*="logo.png"] {
    padding: 20%;
  }

  .gallery-caption {
    font-size: 0.88rem;
    bottom: 0.75rem;
    left: 0.85rem;
    right: 0.85rem;
  }
}

/* ================================================================
   MANIFIESTO (página "Qué ofrezco")
   "Una propuesta · DIGITAL · Para el mundo · HOY" + texto a la derecha.
   Las palabras DIGITAL y HOY tienen un shimmer dorado animado en bucle.
   ================================================================ */
.manifesto-section {
  padding: 7rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.manifesto-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(201, 169, 97, 0.08), transparent 55%),
    radial-gradient(ellipse at 85% 70%, rgba(201, 169, 97, 0.04), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.manifesto-section .container {
  position: relative;
  z-index: 1;
}

.manifesto-eyebrow {
  display: block;
  margin-bottom: 3.5rem;
  text-align: center;
}

.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 5rem;
  align-items: center;
}

.manifesto-words {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.manifesto-line {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 500;
  line-height: 1.05;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}

/* Palabras destacadas: "DIGITAL" y "HOY" */
.manifesto-emphasis {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  position: relative;
}

.manifesto-emphasis > span {
  display: inline-block;
  background: linear-gradient(
    100deg,
    var(--gold-dark) 0%,
    var(--gold) 25%,
    var(--gold-light) 50%,
    var(--gold) 75%,
    var(--gold-dark) 100%
  );
  background-size: 250% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(201, 169, 97, 0.25));
  animation: manifestoShimmer 5s ease-in-out infinite;
}

/* Para que cada palabra destacada empiece el shimmer en momento distinto */
.manifesto-words > .manifesto-emphasis:nth-of-type(2) > span {
  animation-delay: 1.6s;
}

@keyframes manifestoShimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Línea dorada sutil debajo de cada palabra destacada */
.manifesto-emphasis::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  margin-top: 0.45rem;
  background: linear-gradient(90deg, var(--gold), transparent);
  transition: width 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s;
}

.manifesto-emphasis.visible::after {
  width: 80px;
}

.manifesto-text p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.4rem;
  color: var(--text-secondary);
}

.manifesto-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 880px) {
  .manifesto-section {
    padding: 5rem 0 4rem;
  }

  .manifesto-eyebrow {
    margin-bottom: 2.5rem;
  }

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

  .manifesto-words {
    gap: 1rem;
  }

  .manifesto-text p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .manifesto-line {
    font-size: clamp(1.8rem, 9vw, 2.4rem);
  }

  .manifesto-emphasis {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
  }
}

/* ================================================================
   ESTRUCTURA Cliente / Socio (página "Qué ofrezco")
   Esquema visual con dos filas:
   [avatar] -- camión + carrito ---> [marca]
   Watermark grande del rol detrás de cada fila.
   ================================================================ */
.structure-section {
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.structure-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(201, 169, 97, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.structure-section .container {
  position: relative;
  z-index: 1;
}

.structure-diagram {
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 2.5rem 4rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4),
              inset 0 0 60px rgba(201, 169, 97, 0.03);
}

/* Esquinas doradas estilo art déco */
.structure-diagram::before,
.structure-diagram::after {
  content: '';
  position: absolute;
  width: 32px;
  height: 32px;
  border: 1px solid var(--gold);
  opacity: 0.5;
  pointer-events: none;
}

.structure-diagram::before {
  top: 14px;
  left: 14px;
  border-right: none;
  border-bottom: none;
}

.structure-diagram::after {
  bottom: 14px;
  right: 14px;
  border-left: none;
  border-top: none;
}

.structure-row {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr minmax(120px, auto);
  align-items: center;
  gap: 2.5rem;
  position: relative;
  padding: 1.4rem 0;
  z-index: 1;
}

.structure-row + .structure-row {
  border-top: 1px solid rgba(201, 169, 97, 0.12);
  margin-top: 0.5rem;
  padding-top: 2rem;
}

/* Watermark detrás (CLIENTE REGISTRADO / SOCIO REGISTRADO) */
.structure-row::before {
  content: attr(data-watermark);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.4rem, 4.2vw, 3rem);
  letter-spacing: 0.18em;
  color: rgba(201, 169, 97, 0.07);
  pointer-events: none;
  z-index: 0;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
}

.structure-row + .structure-row::before {
  margin-top: 0.5rem;
}

.structure-row > * {
  position: relative;
  z-index: 1;
}

.structure-actor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.actor-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--bg-elevated), var(--bg-primary) 70%);
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
              0 0 0 4px rgba(201, 169, 97, 0.06);
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.actor-avatar:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 36px rgba(201, 169, 97, 0.2),
              0 0 0 6px rgba(201, 169, 97, 0.08);
}

.actor-avatar svg {
  width: 50%;
  height: 50%;
}

.actor-avatar-partner {
  border-color: var(--gold-light);
  background: radial-gradient(circle at 30% 30%, rgba(201, 169, 97, 0.18), var(--bg-primary) 70%);
  color: var(--gold-light);
}

.actor-label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

/* Flujo: línea + camión + carrito */
.structure-flow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  gap: 1rem;
}

.flow-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(201, 169, 97, 0.4) 15%,
    rgba(201, 169, 97, 0.5) 50%,
    rgba(201, 169, 97, 0.4) 85%,
    transparent 100%);
  transform: translateY(-50%);
}

.flow-line::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid var(--gold);
  border-right: 1.5px solid var(--gold);
  transform: translateY(-50%) rotate(45deg);
}

.flow-truck {
  color: rgba(201, 169, 97, 0.35);
  display: inline-flex;
  align-items: center;
  animation: flowSlide 6s ease-in-out infinite;
}

.flow-cart {
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  animation: flowSlide 6s ease-in-out infinite;
  animation-delay: 0.4s;
  filter: drop-shadow(0 4px 12px rgba(201, 169, 97, 0.35));
}

.flow-truck svg {
  width: 56px;
  height: 32px;
}

.flow-cart svg {
  width: 32px;
  height: 32px;
}

@keyframes flowSlide {
  0%, 100% { transform: translateX(-8px); }
  50% { transform: translateX(8px); }
}

/* Marca (cuadrado con letra "A" + línea dorada) */
.structure-brand {
  width: 86px;
  height: 86px;
  background: linear-gradient(145deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
              inset 0 0 20px rgba(201, 169, 97, 0.05);
  transition: transform var(--t-base);
}

.structure-brand:hover {
  transform: translateY(-3px);
}

.brand-letter {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--gold);
  line-height: 1;
  margin-top: 0.2rem;
}

.brand-underline {
  width: 32%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
  margin-top: 6px;
}

@media (max-width: 880px) {
  .structure-section {
    padding: 5rem 0 4rem;
  }

  .structure-diagram {
    padding: 2rem 1.5rem;
  }

  .structure-row {
    gap: 1rem;
    padding: 1.2rem 0;
  }

  .actor-avatar,
  .structure-brand {
    width: 64px;
    height: 64px;
  }

  .brand-letter {
    font-size: 1.7rem;
  }

  .actor-label {
    font-size: 0.62rem;
    letter-spacing: 0.15em;
  }

  .flow-truck svg {
    width: 38px;
    height: 22px;
  }

  .flow-cart svg {
    width: 24px;
    height: 24px;
  }

  .structure-flow {
    gap: 0.4rem;
    height: 48px;
  }

  .structure-row::before {
    font-size: clamp(1rem, 5vw, 1.5rem);
    letter-spacing: 0.14em;
  }

  .structure-diagram::before,
  .structure-diagram::after {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 480px) {
  .structure-row::before {
    font-size: 0.95rem;
    letter-spacing: 0.1em;
  }

  .actor-avatar,
  .structure-brand {
    width: 54px;
    height: 54px;
  }

  .brand-letter {
    font-size: 1.4rem;
  }

  .flow-truck svg {
    width: 30px;
    height: 18px;
  }
}

/* ================================================================
   LIGHTBOX (galería ampliada)
   ================================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.94);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

/* Bloquea scroll del body cuando el lightbox está abierto (clase aplicada en JS) */
body.lightbox-open {
  overflow: hidden;
}

.lightbox-stage {
  position: relative;
  max-width: 92vw;
  max-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius);
  /* Acentos sutiles dorados en las esquinas */
  background: rgba(20, 20, 20, 0.4);
  border: 1px solid rgba(201, 169, 97, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.lightbox-image {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.3s ease;
  will-change: transform;
  opacity: 0;
}

.lightbox.open .lightbox-image {
  opacity: 1;
}

/* Logo placeholder en el lightbox: centrado con opacidad reducida */
.lightbox-image[src*="logo.png"] {
  width: 320px;
  height: 320px;
  padding: 18%;
  opacity: 0.6 !important;
  filter: drop-shadow(0 10px 40px rgba(201, 169, 97, 0.3));
}

.lightbox.open .lightbox-image[src*="logo.png"] {
  opacity: 0.6;
}

.lightbox-stage.zoomed {
  cursor: grab;
}

.lightbox-stage.zoomed.panning {
  cursor: grabbing;
}

.lightbox-image.zoomed {
  transform: scale(2.2);
  cursor: inherit;
}

/* Botones flotantes (cerrar, prev, next, zoom) */
.lightbox button {
  position: absolute;
  background: rgba(15, 15, 15, 0.55);
  border: 1px solid rgba(201, 169, 97, 0.25);
  color: var(--gold);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 2;
  padding: 0;
}

.lightbox button:hover,
.lightbox button:focus-visible {
  border-color: var(--gold);
  background: rgba(201, 169, 97, 0.14);
  color: var(--gold-light);
  outline: none;
}

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

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

.lightbox-prev:hover {
  transform: translateY(-50%) translateX(-3px);
}

.lightbox-next:hover {
  transform: translateY(-50%) translateX(3px);
}

.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
}

.lightbox-zoom {
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
}

.lightbox-zoom .icon-zoom-out { display: none; }
.lightbox.zoomed .lightbox-zoom .icon-zoom-in { display: none; }
.lightbox.zoomed .lightbox-zoom .icon-zoom-out { display: inline; }

.lightbox-caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  pointer-events: none;
  text-align: center;
  max-width: 70vw;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.lightbox-counter {
  position: absolute;
  top: 1.7rem;
  left: 1.7rem;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* Animación de entrada de la imagen */
@keyframes lightboxImageIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox.open .lightbox-image:not(.zoomed) {
  animation: lightboxImageIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (max-width: 720px) {
  .lightbox-prev { left: 0.6rem; }
  .lightbox-next { right: 0.6rem; }

  .lightbox button {
    width: 44px;
    height: 44px;
  }

  .lightbox-zoom {
    width: 40px;
    height: 40px;
    bottom: 1rem;
    right: 1rem;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
  }

  .lightbox-counter {
    top: 1.1rem;
    left: 1.1rem;
    font-size: 0.7rem;
  }

  .lightbox-caption {
    font-size: 1rem;
    bottom: 5rem;
  }
}

/* ================================================================
   VIDEO "MI ESTILO DE VIDA" — sección inline en Qué ofrezco
   El archivo es vertical (9:16, formato móvil/reel)
   ================================================================ */
.lifestyle-video-section {
  padding-bottom: 6rem;
}

.lifestyle-video-wrap {
  position: relative;
  margin: 2.5rem auto 0;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(201, 169, 97, 0.22);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.4) inset;
  background: #000;
}

.lifestyle-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* ================================================================
   BURBUJA FLOTANTE INVITACIÓN
   ================================================================ */
.lifestyle-bubble {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: min(340px, calc(100vw - 2rem));
  z-index: 950;
  background: linear-gradient(160deg, rgba(20, 20, 20, 0.96), rgba(12, 12, 12, 0.96));
  border: 1px solid rgba(201, 169, 97, 0.35);
  border-radius: 18px;
  padding: 0.85rem 1rem 0.85rem 0.85rem;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.3) inset,
    0 0 24px rgba(201, 169, 97, 0.12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition:
    opacity 0.5s ease,
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.lifestyle-bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: lifestyleBubblePulse 3.4s ease-in-out 1.2s infinite;
}

.lifestyle-bubble.dismissed {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  animation: none;
}

.lifestyle-bubble:hover,
.lifestyle-bubble:focus-visible {
  border-color: var(--gold);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.3) inset,
    0 0 32px rgba(201, 169, 97, 0.25);
  outline: none;
  animation: none;
}

.lifestyle-bubble-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.lifestyle-bubble-thumb {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(201, 169, 97, 0.55);
  background: #000;
  box-shadow: 0 0 18px rgba(201, 169, 97, 0.25);
}

.lifestyle-bubble-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.85);
}

.lifestyle-bubble-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  transition: background 0.3s ease;
}

.lifestyle-bubble:hover .lifestyle-bubble-play,
.lifestyle-bubble:focus-visible .lifestyle-bubble-play {
  background: rgba(0, 0, 0, 0.1);
}

.lifestyle-bubble-play svg {
  width: 22px;
  height: 22px;
  fill: var(--gold-light);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  transform: translateX(1px);
}

.lifestyle-bubble-text {
  flex: 1;
  min-width: 0;
}

.lifestyle-bubble-greet {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--gold-light);
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.lifestyle-bubble-msg {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.lifestyle-bubble-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  padding: 0;
}

.lifestyle-bubble-close:hover,
.lifestyle-bubble-close:focus-visible {
  color: var(--gold-light);
  background: rgba(201, 169, 97, 0.12);
  outline: none;
}

@keyframes lifestyleBubblePulse {
  0%, 100% {
    box-shadow:
      0 18px 50px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(0, 0, 0, 0.3) inset,
      0 0 24px rgba(201, 169, 97, 0.12);
  }
  50% {
    box-shadow:
      0 18px 50px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(0, 0, 0, 0.3) inset,
      0 0 36px rgba(201, 169, 97, 0.32);
  }
}

/* ================================================================
   MODAL VIDEO FLOTANTE
   ================================================================ */
.lifestyle-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 1.5rem;
}

.lifestyle-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.lifestyle-modal-stage {
  position: relative;
  width: min(calc(88vh * 9 / 16), 95vw);
  aspect-ratio: 9 / 16;
  max-height: 88vh;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(201, 169, 97, 0.25);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(201, 169, 97, 0.08);
  background: #000;
  transform: scale(0.96);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lifestyle-modal.open .lifestyle-modal-stage {
  transform: scale(1);
}

.lifestyle-modal-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  outline: none;
}

.lifestyle-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 15, 15, 0.6);
  border: 1px solid rgba(201, 169, 97, 0.3);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  padding: 0;
  z-index: 2;
}

.lifestyle-modal-close:hover,
.lifestyle-modal-close:focus-visible {
  border-color: var(--gold);
  background: rgba(201, 169, 97, 0.18);
  color: var(--gold-light);
  outline: none;
  transform: rotate(90deg);
}

.lifestyle-modal-close svg {
  width: 18px;
  height: 18px;
}

.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;
}

body.lifestyle-modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .lifestyle-bubble {
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.75rem 0.85rem 0.75rem 0.75rem;
  }

  .lifestyle-bubble-thumb {
    width: 54px;
    height: 54px;
  }

  .lifestyle-bubble-greet {
    font-size: 0.98rem;
  }

  .lifestyle-bubble-msg {
    font-size: 0.78rem;
  }

  .lifestyle-modal {
    padding: 0.75rem;
  }

  .lifestyle-modal-close {
    width: 38px;
    height: 38px;
    top: 8px;
    right: 8px;
  }

  .lifestyle-video-section {
    padding-bottom: 4rem;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}
