/* ==========================================================================
   KRIVIO SmartGift — Grandmother Tribute Experience
   Honoring Mrs. Krishna Indoria
   ========================================================================== */

:root {
  --tribute-purple-base: #7546A5;
  --tribute-purple-deep: #592982;
  --tribute-purple-glow: #8D58C4;
  --tribute-gold: #D6B36A;
  --tribute-gold-light: #F3E5C8;
}

/* --------------------------------------------------------------------------
   1. Top-Right Glowing Heart Trigger
   -------------------------------------------------------------------------- */
.tribute-trigger-container {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 10000;
  display: flex;
  align-items: center;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

.tribute-heart-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(48, 16, 75, 0.92);
  border: 1.5px solid rgba(214, 179, 106, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #E9D5FF;
  padding: 0;
  outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 14px rgba(117, 70, 165, 0.55), 0 0 26px rgba(75, 35, 107, 0.28);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              background 0.3s ease;
  animation: heartPulse 3.2s ease-in-out infinite;
}

.tribute-heart-btn:focus-visible {
  outline: 3px solid var(--tribute-gold);
  outline-offset: 3px;
}

.tribute-heart-icon {
  width: 22px;
  height: 22px;
  color: #D6B36A;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Subtle, dignified pulsing animation */
@keyframes heartPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(117, 70, 165, 0.5), 0 0 24px rgba(75, 35, 107, 0.25);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 18px rgba(141, 88, 196, 0.65), 0 0 32px rgba(117, 70, 165, 0.4);
  }
}

/* Hover aura expansion */
.tribute-trigger-container:hover .tribute-heart-btn,
.tribute-trigger-container.is-active .tribute-heart-btn {
  transform: scale(1.1);
  background: rgba(75, 35, 107, 0.98);
  border-color: var(--tribute-gold);
  box-shadow: 0 0 24px rgba(141, 88, 196, 0.8), 0 0 45px rgba(117, 70, 165, 0.6);
  animation-play-state: paused;
}

.tribute-trigger-container:hover .tribute-heart-icon,
.tribute-trigger-container.is-active .tribute-heart-icon {
  color: #FFFFFF;
  transform: scale(1.08);
}

/* --------------------------------------------------------------------------
   2. Homepage Paint-Dissolve State
   -------------------------------------------------------------------------- */
body.tribute-active {
  overflow: hidden !important;
}

body.tribute-active #main-content,
body.tribute-active .site-header,
body.tribute-active .site-footer {
  filter: blur(14px) brightness(1.05);
  opacity: 0;
  transform: scale(1.015) translateY(-10px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none !important;
}

#main-content,
.site-header,
.site-footer {
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   3. Full-Screen Medium-Purple Tribute Overlay
   -------------------------------------------------------------------------- */
.tribute-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9998;
  background: 
    radial-gradient(circle at 50% 38%, rgba(214, 179, 106, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 10%, rgba(141, 88, 196, 0.25) 0%, transparent 70%),
    linear-gradient(145deg, #653696 0%, #7546A5 50%, #592982 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem 1.5rem;
}

.tribute-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Particles Canvas */
.tribute-particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Tribute Content Wrapper */
.tribute-content-wrapper {
  position: relative;
  z-index: 2;
  max-width: 960px;
  width: 100%;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
  padding: 1.5rem 0;
}

/* Portrait Frame */
.tribute-portrait-frame {
  flex-shrink: 0;
  width: 320px;
  border-radius: 20px;
  padding: 8px;
  background: linear-gradient(145deg, rgba(214, 179, 106, 0.65), rgba(75, 35, 107, 0.4), rgba(214, 179, 106, 0.7));
  box-shadow: 0 24px 60px rgba(35, 10, 55, 0.6), 0 0 35px rgba(214, 179, 106, 0.3);
  opacity: 0;
  transform: translateY(24px) scale(0.95);
  filter: blur(8px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.tribute-overlay.is-visible .tribute-portrait-frame {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.tribute-portrait-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.25);
  object-fit: cover;
}

/* Tribute Typography & Info */
.tribute-info {
  max-width: 520px;
  color: #FFFFFF;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
}

.tribute-overlay.is-visible .tribute-info {
  opacity: 1;
  transform: translateY(0);
}

.tribute-honorific {
  font-family: var(--kg-font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tribute-gold-light);
  margin-bottom: 0.65rem;
  opacity: 0.92;
}

.tribute-name {
  font-family: var(--kg-font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 2.85rem;
  font-weight: 700;
  line-height: 1.15;
  color: #FFFFFF;
  margin-bottom: 1.15rem;
  text-shadow: 0 2px 14px rgba(35, 10, 55, 0.5);
  letter-spacing: -0.01em;
}

/* Continuous, uninterrupted decorative line */
.tribute-gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 179, 106, 0.65) 15%, rgba(214, 179, 106, 0.65) 85%, transparent);
  margin-bottom: 1.5rem;
}

.tribute-quote {
  font-family: var(--kg-font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.55;
  color: #FAF5FF;
  margin-bottom: 1.25rem;
  text-shadow: 0 1px 8px rgba(35, 10, 55, 0.4);
}

.tribute-subtext {
  font-family: var(--kg-font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.925rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   4. Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (min-width: 769px) {
  /* Offset desktop nav-actions so Enquire to Order never touches the heart */
  .nav-container {
    padding-right: 64px;
  }
}

@media (max-width: 992px) {
  .tribute-content-wrapper {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  .tribute-portrait-frame {
    width: 250px;
  }
  .tribute-name {
    font-size: 2.35rem;
  }
  .tribute-gold-divider {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .tribute-trigger-container {
    top: 16px;
    right: 14px;
  }
  .tribute-heart-btn {
    width: 42px;
    height: 42px;
  }
  /* Offset mobile nav-actions to avoid collision with heart */
  .nav-container {
    padding-right: 56px;
  }
  .tribute-overlay {
    padding: 3.5rem 1.25rem 2rem 1.25rem;
  }
  .tribute-portrait-frame {
    width: 200px;
  }
  .tribute-name {
    font-size: 2.1rem;
  }
  .tribute-quote {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .tribute-portrait-frame {
    width: 175px;
    border-radius: 16px;
  }
  .tribute-name {
    font-size: 1.85rem;
  }
  .tribute-honorific {
    font-size: 0.725rem;
  }
  .tribute-quote {
    font-size: 1.05rem;
  }
  .tribute-subtext {
    font-size: 0.85rem;
  }
}

/* --------------------------------------------------------------------------
   5. Reduced Motion Accessibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .tribute-heart-btn {
    animation: none;
  }
  body.tribute-active #main-content,
  body.tribute-active .site-header,
  body.tribute-active .site-footer {
    filter: none;
    transform: none;
    transition: opacity 0.35s ease;
  }
  .tribute-overlay {
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }
  .tribute-portrait-frame,
  .tribute-info {
    filter: none;
    transform: none;
    transition: opacity 0.35s ease;
  }
  .tribute-particles-canvas {
    display: none;
  }
}
