/* ============================================================
   GALERIA SENNINHA — gallery.css
   Tema: F1 / Ayrton Senna (Stitch prototype)
   Fonts: Space Grotesk (headline) | Plus Jakarta Sans (body)
   Colors: #131313 bg | #ffd700 yellow | #e10211 red
   This file handles only what Tailwind can't (Swiper, animations,
   carbon texture, and a few structural rules).
   ============================================================ */

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

html, body {
  cursor: none; /* telão — sem cursor */
}

/* ── Carbon fiber ──────────────────────────────────────────── */
.carbon-fiber-pattern {
  background-image:
    linear-gradient(45deg, #1b1b1b 25%, transparent 25%),
    linear-gradient(-45deg, #1b1b1b 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1b1b1b 75%),
    linear-gradient(-45deg, transparent 75%, #1b1b1b 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px 5px, 5px 0;
  opacity: 0.3;
  pointer-events: none;
}

/* ── Title style ───────────────────────────────────────────── */
.hud-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.1em;
  word-spacing: 0.5rem;
  text-transform: uppercase;
  transform: skew(-5deg);
}

.skew-title {
  display: inline-block;
  transform: skew(-5deg);
}

/* ── Swiper fills its container ────────────────────────────── */
.gallery-swiper,
.gallery-swiper .swiper-wrapper,
.gallery-swiper .swiper-slide {
  width: 100%;
  height: 100%;
}

.gallery-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: #0e0e0e;
}

.gallery-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: photoReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes photoReveal {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Photo credit ──────────────────────────────────────────── */
.photo-credit {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2.5rem 1rem 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

/* ── "NOVO" badge ──────────────────────────────────────────── */
.swiper-slide.slide-new::after {
  content: "NOVO";
  position: absolute;
  top: 1rem; left: 1rem;
  z-index: 30;
  background: #e10211;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  animation: badgeFade 3s ease-out forwards;
}
@keyframes badgeFade {
  0%  { opacity: 1; }
  70% { opacity: 1; }
  100%{ opacity: 0; }
}

/* ── Empty-state slide ─────────────────────────────────────── */
.slide-empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: emptyFloat 4s ease-in-out infinite;
}
@keyframes emptyFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* ── Photo frame container ─────────────────────────────────── */
.photo-frame {
  min-height: 0; /* allows flex-grow to shrink inside flex column */
}

/* ── Red "lap" progress bar animation ──────────────────────── */
.lap-bar {
  animation: lapProgress 5s linear infinite;
}
@keyframes lapProgress {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ── Scrolling marquee ─────────────────────────────────────── */
.marquee-container {
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.animate-marquee { animation: marquee 22s linear infinite; }

/* ── Ranking rows: flash animation on name change ────────────── */
@keyframes rankFlash {
  0%   { background: rgba(255, 215, 0, 0.25); border-radius: 0.75rem; }
  100% { background: transparent; }
}

/* ── Swiper pagination ─────────────────────────────────────── */
.swiper-pagination-bullet {
  background: #ffd700 !important;
  opacity: 0.45 !important;
}
.swiper-pagination-bullet-active {
  opacity: 1 !important;
  transform: scale(1.3);
}

/* ── Toast notification ────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  background: rgba(32, 32, 31, 0.95);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: #e5e2e1;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  white-space: nowrap;
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
