/* ==========================================================================
   Componente: tarjeta de proyecto + cursor personalizado
   Portada con su proporción natural, radio 24px (40px en desktop).
   ========================================================================== */

@layer components {
  .project-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background-color: var(--color-surface-2);
    isolation: isolate;
  }

  .project-card__cover {
    width: 100%;
    height: auto;
    transition: transform 0.8s var(--ease-out);
  }

  .project-card:hover .project-card__cover {
    transform: scale(1.02);
  }

  .project-card__tags {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .project-card__tag {
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    background-color: var(--palette-white-10);
    backdrop-filter: blur(10px);
    color: var(--color-text-soft);
    font-size: 14px;
    line-height: 20px;
  }

  .project-card__texts {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: linear-gradient(180deg, transparent, rgb(0 0 0 / 70%));
  }

  .project-card__tagline {
    color: rgb(237 237 237);
    font-size: 16px;
    line-height: 24px;
  }

  .project-card__title {
    color: var(--color-text);
    font-size: 32px;
    font-weight: 500;
    line-height: 36px;
  }

  @media (min-width: 1440px) {
    .project-card {
      border-radius: var(--radius-xl);
    }
  }

  /* --- Cursor personalizado --- */
  .has-custom-cursor [data-cursor-target] {
    cursor: none;
  }

  /* Se mueve con "translate" (JS) y se centra en el puntero con los márgenes negativos */
  .cursor-badge {
    position: fixed;
    top: -32px;
    left: -32px;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 100px;
    background: linear-gradient(180deg, var(--palette-white) 0%, var(--palette-mercury) 100%);
    color: var(--palette-dark-gray);
    opacity: 0;
    scale: 0.4;
    pointer-events: none;
    transition: opacity 0.25s var(--ease-out), scale 0.25s var(--ease-out);

    &.is-visible {
      opacity: 1;
      scale: 1;
    }
  }
}
