/* ============================================================
   RESET MÍNIMO
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}


/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Color — base */
  --bg-base:        #161616;
  --bg-surface:     #1E1E1E;
  --bg-elevated:    #262626;
  --border:         #2E2E2E;
  --border-strong:  #3D3D3D;

  /* Color — texto */
  --text-primary:   #F2F0EB;
  --text-secondary: #A8A49C;
  --text-muted:     #6E6A63;

  /* Color — acento */
  --accent:         #E8C96D;
  --accent-dark:    #C9A84C;
  --accent-glow:    rgba(232, 201, 109, 0.12);

  /* Color — semánticos */
  --positive:       #4ADE80;

  /* Tipografía — escala */
  --fs-hero:  clamp(2.6rem, 7vw, 4.8rem);
  --fs-h2:    clamp(1.8rem, 4vw, 2.6rem);
  --fs-h3:    1.25rem;
  --fs-body:  1.0625rem;
  --fs-small: 0.875rem;
  --fs-label: 0.75rem;

  /* Espaciado */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  96px;
  --sp-10: 128px;

  /* Layout */
  --container:  1100px;
  --px-mobile:  24px;
  --px-desktop: 48px;
}


/* ============================================================
   BODY
   ============================================================ */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}


/* ============================================================
   CONTENEDOR
   ============================================================ */
.container {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding-inline: var(--px-mobile);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--px-desktop);
  }
}


/* ============================================================
   TIPOGRAFÍA BASE
   ============================================================ */
h1 {
  font-size: var(--fs-hero);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.2;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.3;
}

p {
  line-height: 1.65;
}

h1, h2, h3, p {
  overflow-wrap: break-word;
  word-break: break-word;
}

a {
  color: var(--accent);
  text-decoration: none;
}


/* ============================================================
   UTILIDADES
   ============================================================ */
.mono {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}


/* ============================================================
   ACCESIBILIDAD — FOCUS
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}


/* ============================================================
   SKIP LINK
   ============================================================ */
.skip-link {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  background: var(--bg-surface);
  color: var(--accent);
  font-weight: 700;
  font-size: var(--fs-small);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  transform: translateY(-200%);
  transition: transform 180ms ease-out;
  z-index: 9999;
}

.skip-link:focus {
  transform: translateY(0);
}


/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 200ms ease, backdrop-filter 200ms ease;
}

.nav--scrolled {
  background: rgba(22, 22, 22, 0.85);
  backdrop-filter: blur(12px);
}

.nav__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav__logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--accent);
  text-decoration: none;
  line-height: 1;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.nav__link {
  color: var(--text-secondary);
  font-size: var(--fs-small);
  text-decoration: none;
  transition: color 180ms ease-out;
}

.nav__link:hover,
.nav__link--active {
  color: var(--text-primary);
}

/* Estado activo: enlaces de texto de la nav */
.nav a.nav--active:not(.btn--primary) {
  color: var(--accent);
}

/* Estado activo: botón CTA Contacto */
.nav .btn--primary.nav--active {
  background: var(--accent-dark);
  color: #1a1000;
}

@media (max-width: 767px) {
  .nav__link {
    display: none;
  }
}

/* ── Scroll margin para nav fija ── */
section {
  scroll-margin-top: 90px;
}


/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  font-size: var(--fs-small);
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 180ms ease-out, color 180ms ease-out, border-color 180ms ease-out;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #1a1000;
}

.btn--primary:hover {
  background: var(--accent-dark);
  color: #1a1000;
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}


/* ============================================================
   HERO
   ============================================================ */
#hero {
  padding-top: calc(64px + var(--sp-9));
  padding-bottom: var(--sp-9);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--accent-glow);
  color: var(--positive);
  border: 1px solid var(--positive);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: var(--fs-small);
  font-weight: 500;
  margin-bottom: var(--sp-5);
}

.hero__eyebrow {
  font-size: var(--fs-label);
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--sp-5);
  color: var(--text-primary);
  max-width: 100%;
}

.hero__accent-word {
  position: relative;
}

.hero__accent-word::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform-origin: left;
}

.hero__body {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: var(--sp-6);
}

.hero__ctas {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
}

.hero__stats {
  display: flex;
  gap: var(--sp-7);
  flex-wrap: wrap;
}

.stat__value {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat__label {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.4;
  display: block;
  margin-top: var(--sp-1);
}

@media (max-width: 480px) {
  .hero__title {
    font-size: clamp(1.75rem, 9vw, 2.6rem);
  }

  .hero__eyebrow {
    font-size: 0.65rem;
    white-space: normal;
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--sp-5);
  }
}


/* ============================================================
   PROYECTO DESTACADO — EMITE
   ============================================================ */

/* ── Etiquetas de sección ── */
.section-label {
  font-size: var(--fs-label);
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-6);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--border);
}

/* ── Grid Emite 60/40 ── */
.emite-grid {
  display: grid;
  grid-template-columns: 60fr 40fr;
  gap: var(--sp-8);
  align-items: start;
  padding-bottom: var(--sp-9);
}

@media (max-width: 900px) {
  .emite-grid { grid-template-columns: 1fr; }
}

/* ── Media ── */
.emite-media__main img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.emite-media__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.emite-media__thumbs img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: border-color 180ms ease-out;
  cursor: pointer;
}

.emite-media__thumbs img:hover {
  border-color: var(--accent);
}

/* ── Ficha ── */
.emite-ref {
  font-size: var(--fs-label);
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.emite-star {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-style: normal;
}

.emite-title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--sp-3);
}

.emite-claim {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: var(--sp-5);
}

.emite-meta {
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
}

.emite-meta__label {
  font-size: var(--fs-label);
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--sp-1);
}

.emite-meta__value {
  font-size: var(--fs-small);
  color: var(--text-primary);
}

.emite-live { color: var(--positive); }

.emite-desc {
  color: var(--text-secondary);
  margin-bottom: var(--sp-5);
}

.emite-hard { margin-bottom: var(--sp-5); }

.emite-hard__title {
  font-size: var(--fs-label);
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.emite-hard__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.emite-hard__list li {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  padding-left: var(--sp-4);
  position: relative;
  line-height: 1.55;
}

.emite-hard__list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.emite-metrics {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
}

.emite-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.chip {
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  transition: border-color 180ms ease-out, color 180ms ease-out;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.emite-ctas {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}

#btn-emite-video {
  gap: 6px;
}

.emite-private {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.5;
}


/* ============================================================
   MÁS PROYECTOS — GRID + TOTAL
   ============================================================ */

/* ── Grid de proyectos ── */
.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}

@media (max-width: 768px) {
  .proyectos-grid { grid-template-columns: 1fr; }
}

/* ── Tarjeta de proyecto ── */
.proyecto-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: border-color 180ms ease-out,
              background 180ms ease-out;
}

.proyecto-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.proyecto-ref {
  font-size: var(--fs-label);
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.proyecto-nombre {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.proyecto-desc {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.55;
  flex-grow: 1;
}

.proyecto-datos {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

.proyecto-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}

.proyecto-links {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

/* Botón pequeño ghost */
.btn--sm {
  font-size: var(--fs-small);
  padding: 7px 14px;
}

/* ── Línea TOTAL ── */
.proyectos-total {
  padding-bottom: var(--sp-9);
}

.proyectos-total__line {
  width: 100%;
  height: 1px;
  background: var(--border-strong);
  margin-bottom: var(--sp-4);
}

.proyectos-total__texto {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.proyectos-total__texto .accent {
  color: var(--accent);
  font-weight: 700;
}


/* ============================================================
   TRAYECTORIA
   ============================================================ */

/* ── Trayectoria grid ── */
.trayectoria-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  padding-bottom: var(--sp-9);
}

@media (max-width: 768px) {
  .trayectoria-grid { grid-template-columns: 1fr; }
}

.trayectoria-col__titulo {
  font-size: var(--fs-label);
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}

/* ── Timeline ── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:first-child {
  padding-top: 0;
}

.timeline-item__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}

.timeline-item__fecha {
  font-size: var(--fs-label);
  color: var(--accent);
  letter-spacing: 0.06em;
}

.timeline-item__tipo {
  font-size: var(--fs-label);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-item__empresa {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  line-height: 1.3;
}

.timeline-item__desc {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.55;
}

.timeline-item__tfg {
  font-size: var(--fs-small);
  color: var(--accent);
  margin-top: var(--sp-2);
  font-style: italic;
}

.timeline-nota {
  padding-top: var(--sp-5);
  font-size: var(--fs-small);
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.55;
}

/* ── Certificaciones (nivel 2 — más pequeño) ── */
.certificaciones {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.certificaciones__titulo {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.certificaciones__lista {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.certificaciones__lista li {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-left: var(--sp-3);
  position: relative;
  line-height: 1.4;
}

.certificaciones__lista li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}


/* ============================================================
   STACK
   ============================================================ */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
  padding-bottom: var(--sp-9);
}

@media (max-width: 1024px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stack-grid { grid-template-columns: 1fr; }
}

.stack-grupo__titulo {
  font-size: var(--fs-label);
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}


/* ============================================================
   CONTACTO
   ============================================================ */

.contacto-inner {
  max-width: 640px;
  padding-bottom: var(--sp-10);
}

.contacto-titulo {
  font-size: var(--fs-h2);
  font-weight: 700;
  margin-bottom: var(--sp-4);
}

.contacto-desc {
  color: var(--text-secondary);
  margin-bottom: var(--sp-7);
  max-width: 480px;
}

.contacto-email-wrapper {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.contacto-email {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 180ms ease-out;
}

.contacto-email:hover {
  color: var(--accent-dark);
}

.btn-copy {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  padding: 6px 9px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 180ms ease-out, color 180ms ease-out;
  flex-shrink: 0;
}

.btn-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-copy--done {
  border-color: var(--positive);
  color: var(--positive);
}

.btn-copy__feedback { display: none; }

.contacto-links {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}


/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-7) 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer__copy {
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.footer__em {
  color: var(--text-secondary);
  font-weight: 500;
}

.footer__legal {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.footer__legal a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 180ms ease-out;
}

.footer__legal a:hover {
  color: var(--accent);
}


/* ════════════════════════════════════════════
   MÓVIL — espaciado vertical
   ════════════════════════════════════════════ */

@media (max-width: 768px) {

  .emite-grid,
  .proyectos-total,
  .trayectoria-grid,
  .stack-grid {
    padding-bottom: var(--sp-7);
  }

  .contacto-inner {
    padding-bottom: var(--sp-8);
  }

  .section-label {
    padding-top: var(--sp-5);
    margin-bottom: var(--sp-5);
  }

  .stack-grid {
    margin-bottom: 0;
  }

}


/* ════════════════════════════════════════════
   F6 — MOTION
   Todo dentro de prefers-reduced-motion: no-preference
   ════════════════════════════════════════════ */

@keyframes fadeRise8 {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeRise16 {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes drawUnderline {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: no-preference) {

  /* ── Hero: líneas y spans como bloques ── */
  .hero__line1,
  .hero__line2 {
    display: block;
  }

  /* ── Secuencia de entrada del hero ── */

  /* t=0ms: badge */
  .badge {
    animation: fadeRise8 300ms ease-out 0ms both;
  }

  /* t=100ms: eyebrow */
  .hero__eyebrow {
    animation: fadeRise8 300ms ease-out 100ms both;
  }

  /* t=200ms: línea 1 del H1 */
  .hero__line1 {
    animation: fadeRise16 400ms ease-out 200ms both;
  }

  /* t=350ms: línea 2 del H1 */
  .hero__line2 {
    animation: fadeRise16 400ms ease-out 350ms both;
  }

  /* t=600ms: subrayado champán (dibujado de izquierda a derecha) */
  .hero__accent-word::after {
    transform-origin: left;
    animation: drawUnderline 350ms ease-out 600ms both;
  }

  /* t=700ms: párrafo y CTAs */
  .hero__body {
    animation: fadeRise16 400ms ease-out 700ms both;
  }
  .hero__ctas {
    animation: fadeRise16 400ms ease-out 700ms both;
  }

  /* t=850ms: stats */
  .hero__stats {
    animation: fadeRise16 400ms ease-out 850ms both;
  }

  /* ── Scroll reveals (resto de secciones) ── */
  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 450ms ease-out, transform 450ms ease-out;
  }

  .js .reveal--visible {
    opacity: 1;
    transform: translateY(0);
  }

}

/* Fuera del media query: .hero__line1 y .hero__line2 son siempre
   visibles en reduced-motion / sin JS */
@media (prefers-reduced-motion: reduce) {
  .hero__line1,
  .hero__line2 {
    display: block;
  }
}


/* ── Lightbox ── */

.lightbox-trigger {
  background: none;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
  cursor: zoom-in;
}

.lightbox-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#lightbox {
  background: transparent;
  border: none;
  padding: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  overflow: hidden;
}

#lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

#lightbox-img {
  max-width: 90vw;
  max-height: 85dvh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.lightbox-close {
  position: fixed;
  top: var(--sp-5);
  right: var(--sp-5);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
  transition: background 180ms ease-out;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (prefers-reduced-motion: no-preference) {
  #lightbox[open] {
    animation: lbFadeIn 180ms ease-out;
  }
  @keyframes lbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* ── Zona de medio: altura fija igual en las 3 tarjetas ── */
.card-media {
  height: 400px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: var(--sp-5);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.card-media .lightbox-trigger {
  width: 100%;
  height: 100%;
  display: block;
}

.card-media .lightbox-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.card-media video:not([hidden]) {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.card-media--vertical {
  background: var(--bg-surface);
}

/* Fachada de vídeo: imagen + botón de play superpuesto */
.card-facade {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.card-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-facade__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: rgba(22, 22, 22, 0.70);
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background 180ms ease-out, color 180ms ease-out;
}

.card-facade__play:hover {
  background: var(--accent);
  color: #1a1000;
}

.card-facade__play:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Vídeo Emite (columna media) */
.emite-media__main video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border);
}
