:root {
  --canvas-bg: #b08d8d;
  --off-pixel: #9e7a7a;
  --on-pixel: #fce4e4;
  --grid-columns: 70;
  --pixel-gap: 2px;

  /* --- SLOWER ANIMATIONS --- */
  --pulse-speed: 4s;      /* Much slower heartbeat (was 2.5s) */
  --wave-speed: 12s;      /* Much slower background shimmer (was 8s) */
  --scale-amount: 1.35;   /* Slightly gentler growth */
}

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--canvas-bg);
  background: radial-gradient(circle at center, #ba9999 0%, #b08d8d 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Cormorant Garamond', serif;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 95vw;
  height: 90vh;
  justify-content: center;
  z-index: 10;
}

/* Elegant Title Styling */
.wedding-title {
  font-size: clamp(1.8rem, 6vw, 3.2rem);
  color: var(--on-pixel);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 4px;
  margin-bottom: 50px;
  text-align: center;
  text-shadow: 0 0 15px rgba(252, 228, 224, 0.4);
  opacity: 0.9;
  /* Slower fade-in on load */
  animation: fadeInTitle 5s ease-in-out;
}

.wedding-title .amp {
  font-style: normal;
  font-size: 0.8em;
  opacity: 0.5;
  margin: 0 15px;
}

#pixel-canvas {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: var(--pixel-gap);
  width: 100%;
  max-height: 55vh;
  justify-content: center;
  align-content: center;
}

.p {
  background-color: var(--off-pixel);
  border-radius: 1px;
  aspect-ratio: 1 / 1;
  transition: background-color 1s ease; /* Slower color transition */
  transform: scale(1);
  /* Slower background wave */
  animation: bgWave var(--wave-speed) infinite ease-in-out;
}

@keyframes bgWave {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; } /* Deeper fade for background boxes */
}

/* Slow Heartbeat for active pixels */
.p.on {
  background-color: var(--on-pixel);
  box-shadow: 0 0 15px rgba(252, 228, 224, 0.5), 0 0 25px var(--on-pixel);
  z-index: 20;
  animation: softPulse var(--pulse-speed) infinite ease-in-out !important;
  opacity: 1 !important;
}

@keyframes softPulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1) blur(0px);
  }
  50% {
    transform: scale(var(--scale-amount));
    filter: brightness(1.15) blur(0.5px); /* Soft focus effect at peak */
  }
}

.location-label {
  margin-top: 45px;
  font-size: 1.2rem;
  font-style: italic;
  letter-spacing: 2px;
  color: var(--on-pixel);
  opacity: 0.7;
  text-align: center;
  animation: fadeInTitle 6s ease-in-out;
}

@keyframes fadeInTitle {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 0.9; transform: translateY(0); }
}

.overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
  z-index: 100;
}
