﻿/* premium-theme.css */
body[data-premium="true"] .template-card {
  position: relative;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  transform: translateZ(0);
}

body[data-premium="true"] .template-card:hover {
  transform: perspective(1000px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) translateY(-10px) scale3d(1.02, 1.02, 1.02);
  box-shadow: 
    0 30px 60px rgba(0,0,0,0.15),
    0 0 40px rgba(99,102,241,0.2)
  ;
  z-index: 10;
}

body[data-premium="true"] .template-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  mix-blend-mode: overlay;
  border-radius: inherit;
}

body[data-premium="true"] .template-card:hover::after {
  opacity: 1;
}

/* Staggered Scroll Reveal */
body[data-premium="true"] .scroll-fade-card {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--card-delay, 0s);
}

body[data-premium="true"] .scroll-fade-card.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Template image floating effect */
body[data-premium="true"] #featured .template-card .card-image-wrap,
body[data-premium="true"] #templates-section .template-card .card-image-wrap {
  overflow: hidden;
}

body[data-premium="true"] #featured .template-card .card-image-wrap img,
body[data-premium="true"] #templates-section .template-card .card-image-wrap img {
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  animation: premiumTemplateFloat 7s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}

body[data-premium="true"] #featured .template-card:hover .card-image-wrap img,
body[data-premium="true"] #templates-section .template-card:hover .card-image-wrap img {
  animation-play-state: paused;
  transform: translate3d(0, -6px, 0) scale(1.06);
}

body[data-premium="true"] #featured .template-card.coming-soon .card-image-wrap img,
body[data-premium="true"] #templates-section .template-card.coming-soon .card-image-wrap img {
  animation: none;
  transform: none;
}

@keyframes premiumTemplateFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -8px, 0) scale(1.015);
  }
}



/* ===== Premium Polish Pack ===== */
:root {
  --premium-glow: radial-gradient(1200px 600px at 80% -10%, rgba(196, 96, 58, 0.14), transparent 55%),
                  radial-gradient(900px 500px at -10% 20%, rgba(232, 168, 130, 0.16), transparent 52%);
}

/* Background atmosphere */
body {
  background-image: var(--premium-glow);
  background-attachment: fixed;
}

/* Glassier navbar */
.navbar {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: 0 14px 40px rgba(20, 15, 10, 0.08);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* Hero depth */
.hero-mockup-card,
.detail-preview-img {
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 22px 60px rgba(14, 12, 10, 0.22), 0 4px 18px rgba(14, 12, 10, 0.12);
  transform: translateZ(0);
}

/* Premium button treatment */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: -130%;
  left: -40%;
  width: 40%;
  height: 360%;
  transform: rotate(22deg);
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.28), transparent);
  transition: transform 0.8s ease;
}
.btn-primary:hover::after {
  transform: translateX(290%) rotate(22deg);
}

/* Cards feel more luxury */
.template-card,
.value-card,
.testimonial-card {
  border: 1px solid rgba(28, 26, 22, 0.08);
  box-shadow: 0 8px 30px rgba(28, 26, 22, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.template-card:hover,
.value-card:hover,
.testimonial-card:hover {
  transform: translateY(-6px);
  border-color: rgba(196, 96, 58, 0.26);
  box-shadow: 0 18px 42px rgba(28, 26, 22, 0.13);
}

/* Typography polish */
.hero-title,
.about-name,
h1,
h2 {
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero-subtitle,
p {
  text-wrap: pretty;
}

/* Subtle section separators */
.section,
.section-sm {
  position: relative;
}
.section::after,
.section-sm::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(28, 26, 22, 0.1), transparent);
}

/* Mobile refinement */
@media (max-width: 768px) {
  .navbar {
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
  }

  .template-card:hover,
  .value-card:hover,
  .testimonial-card:hover {
    transform: none;
  }

  .hero-mockup-card,
  .detail-preview-img {
    box-shadow: 0 14px 36px rgba(14, 12, 10, 0.18);
  }
}
