/*=============== LOGOS PAGE — EDITORIAL REDESIGN ===============*/

/* ---- GRAIN OVERLAY ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: overlay;
}

/* ---- HERO SECTION ---- */
.logos__hero {
  text-align: center;
  padding: 1.5rem 0 3rem;
  position: relative;
}

.logos__hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--second-font);
  font-size: 0.688rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-color-light);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  padding: 0.45rem 1.1rem;
  border-radius: 2rem;
  margin-bottom: 2rem;
}

.logos__hero-eyebrow .eyebrow-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--first-color);
  display: inline-block;
  box-shadow: 0 0 8px rgba(201, 24, 60, 0.7);
  flex-shrink: 0;
}

.logos__hero-title {
  font-family: var(--second-font);
  font-size: clamp(2.4rem, 7vw, 4.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--title-color);
  margin-bottom: 1.25rem;
}

.logos__hero-title span {
  color: var(--first-color);
}

.logos__hero-sub {
  font-size: var(--normal-font-size);
  color: var(--text-color);
  max-width: 400px;
  margin: 0 auto 1.75rem;
  line-height: 1.75;
}

.logos__hero-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--text-color-light);
  letter-spacing: 0.5px;
}

.logos__hero-hint i {
  font-size: 0.9rem;
  color: var(--first-color);
  animation: tap-pulse 2.2s ease-in-out infinite;
}

@keyframes tap-pulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50%       { transform: scale(1.25); opacity: 1; }
}

/* ---- GRID OVERRIDES ---- */
.logos__container {
  row-gap: 1.5rem !important;
  column-gap: 1.5rem !important;
}

/* ---- CARD FULL REDESIGN ---- */
.logo__card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  padding: 0 !important;
  border-radius: 1.25rem;
  cursor: pointer;
  text-align: left;
  background: #0a0a0a;
  /* Nuke the styles.css borders that create white lines at corners */
  border: none !important;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  /* GPU layer: prevents sub-pixel corner artifacts */
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  isolation: isolate;
}

/* Keep the Z-axis compositing layer on hover so the corner fix stays active */
.logo__card:hover {
  transform: translateY(-0.35rem) translateZ(0);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(201, 24, 60, 0.12);
}

.logo__card:focus-visible {
  outline: 2px solid var(--first-color);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(201, 24, 60, 0.2);
}

.logo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0 !important;
  display: block;
  margin-bottom: 0 !important; /* override styles.css 1.5rem */
  position: relative;
  z-index: 1;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: unset !important;
}

.logo__card:hover .logo__img {
  transform: scale(1.06);
}

/* Large faded ordinal numeral */
.logo__num {
  position: absolute;
  bottom: -1rem;
  right: 0.25rem;
  font-family: var(--second-font);
  font-size: clamp(4.5rem, 12vw, 8rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.045);
  line-height: 1;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  transition: color 0.5s ease;
}

.logo__card:hover .logo__num {
  color: rgba(201, 24, 60, 0.08);
}

/* ---- OVERLAY: foot always visible, body reveals on hover ---- */
/*
  Structure:
    .logo__overlay              (absolute bottom:0 — background gradient)
      .logo__overlay-body       (max-height: 0 → 8rem on hover)
        .logo__overlay-body-inner (padding wrapper)
          .logo__description
          .logo__cta
      .logo__overlay-foot       (always visible title strip)
        .logo__title
        .logo__foot-arrow
*/
.logo__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.97) 0%,
    rgba(0, 0, 0, 0.93) 40%,
    rgba(0, 0, 0, 0.75) 70%,
    transparent 100%
  );
  z-index: 4;
}

/* Body: reveals on hover via max-height */
.logo__overlay-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo__card:hover .logo__overlay-body {
  max-height: 8rem;
}

.logo__overlay-body-inner {
  padding: 0.85rem 1.25rem 0;
}

/* Foot: always visible title strip */
.logo__overlay-foot {
  padding: 0.6rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.logo__title {
  font-family: var(--second-font);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}

/* Arrow indicator in foot (always visible) */
.logo__foot-arrow {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--first-color);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.logo__card:hover .logo__foot-arrow {
  background: var(--first-color);
  border-color: var(--first-color);
  color: #fff;
  transform: rotate(-45deg);
}

.logo__description {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

.logo__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--second-font);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--first-color);
  margin-bottom: 0.2rem;
}

.logo__cta i {
  font-size: 0.8rem;
  transition: transform 0.25s ease;
}

.logo__card:hover .logo__cta i {
  transform: translate(3px, -3px);
}

/* Zoom badge in top-right corner */
.logo__badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 5;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.65) translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo__badge i {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

.logo__card:hover .logo__badge {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* ---- MOBILE / TOUCH: always show full overlay ---- */
@media (hover: none), (pointer: coarse) {
  .logo__overlay-body {
    max-height: 8rem !important;
  }

  .logo__badge {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
  }

  .logo__card:hover .logo__img {
    transform: none;
  }
}

/* ---- LIGHTBOX POLISH ---- */
.lightbox {
  background: rgba(0, 0, 0, 0.97) !important;
}

.lightbox__content {
  max-width: 600px !important;
}

.lightbox__swiper .swiper-slide img {
  border-radius: 1rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

/* ---- RESPONSIVE ---- */
@media screen and (min-width: 968px) {
  .logos__container {
    column-gap: 1.75rem !important;
    row-gap: 1.75rem !important;
  }
}

@media screen and (max-width: 539px) {
  /* Keep square — never override to 4/3 */
  .logo__card {
    aspect-ratio: 1 / 1;
  }

  .logos__hero-title {
    letter-spacing: -0.5px;
  }

  .logos__container {
    column-gap: 1rem !important;
    row-gap: 1rem !important;
  }
}
