/* ============================================================
   PLAYMAKER! — Landing Page Styles
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --footer-bg: #e82456;
  --footer-height: 180px;
  --footer-height-mobile: 150px;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ig-size: 36px;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background: #111;
}

/* ============================================================
   LOADING
   ============================================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #e50914;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   MASONRY DESKTOP LAYOUT (Prevents cropping and gaps)
   ============================================================ */
.brand-grid-masonry {
  display: flex;
  width: 100%;
  min-height: calc(100vh - var(--footer-height));
}

.masonry-col {
  width: 50%;
  display: flex;
  flex-direction: column;
}

.masonry-row-half {
  display: flex;
  width: 100%;
}

.masonry-row-half .brand-card {
  width: 50%;
}

.masonry-col > .brand-card {
  width: 100%;
}

/* Ensure images determine their own height in masonry layout */
.brand-grid-masonry .brand-card__bg {
  height: auto;
  object-fit: contain; /* Safe to contain since width matches and height is auto */
}

/* ============================================================
   BRAND CARD
   ============================================================ */
.brand-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Remove fixed height so it scrolls down based on image height */
  height: auto;
}

/* Background image (Now an <img> tag) */

.brand-card__bg {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Color overlay */
.brand-card__overlay {
  position: absolute;
  inset: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Hover zoom bg */
.brand-card:hover .brand-card__bg {
  transform: scale(1.06);
}

/* Brand name / logo text */
.brand-card__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  pointer-events: none;
}

.brand-card__logo {
  max-width: 70%;
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: transform 0.4s ease;
}

.brand-card:hover .brand-card__logo {
  transform: scale(1.05);
}

/* Fallback text name (if no logo image) */
.brand-card__name {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.8rem);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
  line-height: 1.1;
  transition: transform 0.4s ease;
}

.brand-card__subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 6px;
}

.brand-card:hover .brand-card__name {
  transform: scale(1.03);
}

/* ============================================================
   INSTAGRAM ICON BUTTON
   ============================================================ */
.brand-card__ig {
  position: absolute;
  bottom: 18px;
  right: 18px;
  z-index: 10;
  width: var(--ig-size);
  height: var(--ig-size);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: var(--transition);
  opacity: 0.85;
}

.brand-card__ig:hover {
  opacity: 1;
  transform: scale(1.2);
}

.brand-card__ig svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background-color: var(--footer-bg);
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  padding: 0 60px;
}

.footer-left,
.footer-right {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo img {
  max-height: 110px;
  max-width: 350px;
  object-fit: contain;
}

/* ============================================================
   MOBILE — Vertical Layout
   ============================================================ */
@media (max-width: 768px) {
  .brand-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: auto;
  }

  .brand-card {
    width: 100%;
    height: auto;
  }

  /* Specific Grid Placements for Mobile */
  .brand-bigdonte { grid-area: 1 / 1 / 2 / 3; }      /* Row 1, spans 2 (Full Width) */
  .brand-kukami { grid-area: 2 / 1 / 3 / 2; }        /* Row 2, col 1 (Half Width) */
  .brand-miracle { grid-area: 2 / 2 / 3 / 3; }       /* Row 2, col 2 (Half Width) */
  .brand-berjaya { grid-area: 3 / 1 / 4 / 3; }       /* Row 3, spans 2 (Full Width) */
  .brand-kreatifhaus { grid-area: 4 / 1 / 5 / 2; }   /* Row 4, col 1 (Half Width) */
  .brand-dontplayplay { grid-area: 4 / 2 / 5 / 3; }  /* Row 4, col 2 (Half Width) */

  .site-footer {
    height: var(--footer-height-mobile);
  }

  .footer-inner {
    padding: 0 10px;
    gap: 8px;
  }

  .footer-left,
  .footer-right {
    font-size: 0.65rem;
    white-space: nowrap;
  }

  .footer-logo img {
    max-height: 70px;
    max-width: 220px;
  }

  .brand-card__ig {
    bottom: 12px;
    right: 12px;
    --ig-size: 28px;
  }
}

@media (max-width: 480px) {
  .brand-card {
    height: auto;
  }

  .brand-card.brand-berjaya {
    height: auto;
  }
}

/* ============================================================
   RIPPLE EFFECT on Instagram click
   ============================================================ */
@keyframes ripple {
  from {
    transform: scale(0);
    opacity: 0.6;
  }
  to {
    transform: scale(3);
    opacity: 0;
  }
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  width: 40px;
  height: 40px;
  pointer-events: none;
  animation: ripple 0.6s ease-out forwards;
}
