/* ═══════════════════════════════════════
   STYLEVAULT — ANIMATIONS & HOMEPAGE
═══════════════════════════════════════ */

/* ── Page Loader ── */
#page-loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo span {
  font-family: 'Dancing Script', cursive;
  font-size: 2.4rem;
  color: var(--primary);
  display: block;
  text-align: center;
  margin-bottom: 16px;
  animation: logoPulse 1s ease infinite alternate;
}
@keyframes logoPulse {
  from { opacity: 0.5; transform: scale(0.97); }
  to   { opacity: 1;   transform: scale(1.03); }
}
.loader-bar {
  width: 180px; height: 3px;
  background: var(--border);
  border-radius: 99px; overflow: hidden;
}
.loader-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 99px;
  animation: loadFill 1.2s ease forwards;
}
@keyframes loadFill {
  from { width: 0; }
  to   { width: 100%; }
}

/* ── Scroll Progress ── */
#scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── Nav animation ── */
#navbar {
  animation: navSlideDown 0.7s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes navSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
#navbar.scrolled {
  background: rgba(176,102,51,0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(100,50,10,0.25);
}
nav .nav-links a {
  animation: fadeInDown 0.5s ease both;
}
nav .nav-links a:nth-child(1) { animation-delay: 0.15s; }
nav .nav-links a:nth-child(2) { animation-delay: 0.22s; }
nav .nav-links a:nth-child(3) { animation-delay: 0.29s; }
nav .nav-links a:nth-child(4) { animation-delay: 0.36s; }
nav .nav-links a:nth-child(5) { animation-delay: 0.43s; }

/* ── Hero ── */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px 60px;
  overflow: hidden;
  position: relative;
  text-align: center;
}
.hero-content { max-width: 680px; position: relative; z-index: 2; }
.hero-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orbFloat ease-in-out infinite alternate;
}
.orb1 {
  width: 500px; height: 500px;
  background: rgba(212,175,55,0.18);
  top: -100px; right: -100px;
  animation-duration: 8s;
}
.orb2 {
  width: 350px; height: 350px;
  background: rgba(255,183,107,0.15);
  bottom: -80px; left: -80px;
  animation-duration: 10s;
  animation-delay: 2s;
}
.orb3 {
  width: 250px; height: 250px;
  background: rgba(176,102,51,0.12);
  top: 40%; left: 40%;
  animation-duration: 12s;
  animation-delay: 4s;
}
@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.08); }
}

/* Hero content */
.hero-content { flex: 1; max-width: 560px; position: relative; z-index: 2; }

.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 99px;
  border: 1px solid rgba(212,175,55,0.4);
  margin-bottom: 20px;
  text-transform: uppercase;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.4rem;
  line-height: 1.2;
  margin-bottom: 18px;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 34px;
  line-height: 1.7;
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; justify-content: center; }
.btn-primary {
  background: var(--white);
  color: var(--primary);
  padding: 14px 36px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
  display: inline-block;
}
.btn-primary:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 32px rgba(0,0,0,0.2); background: var(--gold); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid rgba(255,255,255,0.5);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--gold); background: rgba(212,175,55,0.15); transform: translateY(-3px); }

.hero-stats { display: flex; align-items: center; gap: 24px; justify-content: center; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.5rem; color: var(--gold); font-weight: 700; }
.stat span { font-size: 0.78rem; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.8px; }
.stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,0.25); }

/* Hero visual — floating phone cards */
.hero-visual {
  flex: 1;
  max-width: 520px;
  position: relative;
  height: 460px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
}

.floating-card {
  position: absolute;
  background: transparent;
  border-radius: 28px;
  padding: 0;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), filter 0.4s ease;
}
.floating-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 22px;
  filter: drop-shadow(0 24px 32px rgba(80,40,10,0.28)) drop-shadow(0 8px 12px rgba(80,40,10,0.15));
  transition: filter 0.4s ease, transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.floating-card:hover img {
  filter: drop-shadow(0 32px 48px rgba(80,40,10,0.38)) drop-shadow(0 12px 20px rgba(80,40,10,0.2));
  transform: scale(1.07) translateY(-8px);
}

/* Left card */
.fc1 {
  width: 175px; height: 218px;
  bottom: 30px; left: 20px;
  transform: rotate(-8deg);
  animation: float1 5s ease-in-out infinite;
  z-index: 1;
}
/* Center card — largest, straight */
.fc2 {
  width: 210px; height: 256px;
  bottom: 20px; left: 50%;
  transform: translateX(-50%) rotate(0deg);
  animation: float2 6s ease-in-out infinite;
  z-index: 3;
}
/* Right card */
.fc3 {
  width: 170px; height: 212px;
  bottom: 30px; right: 20px;
  transform: rotate(8deg);
  animation: float3 5.5s ease-in-out infinite;
  z-index: 1;
}

/* Hover overrides rotation */
.fc1:hover { transform: rotate(-4deg) translateY(-10px) scale(1.05); z-index: 5; }
.fc2:hover { transform: translateX(-50%) translateY(-12px) scale(1.05); z-index: 5; }
.fc3:hover { transform: rotate(4deg) translateY(-10px) scale(1.05); z-index: 5; }

@keyframes float1 {
  0%,100% { transform: rotate(-8deg) translateY(0px); }
  50%      { transform: rotate(-8deg) translateY(-18px); }
}
@keyframes float2 {
  0%,100% { transform: translateX(-50%) translateY(0px); }
  50%      { transform: translateX(-50%) translateY(-22px); }
}
@keyframes float3 {
  0%,100% { transform: rotate(8deg) translateY(0px); }
  50%      { transform: rotate(8deg) translateY(-15px); }
}

/* ── Feature Strip ── */
.feature-strip {
  background: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 22px 40px;
  box-shadow: 0 2px 16px rgba(100,50,10,0.08);
  border-top: 3px solid rgba(212,175,55,0.3);
  border-bottom: 3px solid rgba(212,175,55,0.3);
  flex-wrap: wrap;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 32px;
  transition: transform 0.2s;
}
.feature-item:hover { transform: translateY(-2px); }
.feature-icon { font-size: 1.8rem; }
.feature-item div { display: flex; flex-direction: column; }
.feature-item strong { font-size: 0.92rem; color: var(--text); font-weight: 700; }
.feature-item small { font-size: 0.78rem; color: #999; margin-top: 2px; }
.feature-divider { width: 1px; height: 40px; background: var(--border); }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Product card animations ── */
.product-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.25s ease;
}
.product-card.visible { opacity: 1; transform: translateY(0); }
.product-card:hover { transform: translateY(-8px) scale(1.02) !important; box-shadow: 0 16px 48px rgba(100,50,10,0.22) !important; }
.product-card img { transition: transform 0.4s ease; }
.product-card:hover img { transform: scale(1.07); }
.product-card .info button {
  position: relative; overflow: hidden;
  transition: background 0.25s, transform 0.2s;
}
.product-card .info button:hover { transform: scale(1.03); }

/* Ripple */
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: rippleAnim 0.55s linear;
  pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

/* ── Cart count pulse ── */
@keyframes cartPulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.4); }
}
.cart-pulse { animation: cartPulse 0.4s ease; }

/* ── Scroll to top ── */
#scroll-top {
  position: fixed; bottom: 32px; right: 32px;
  width: 46px; height: 46px;
  background: var(--primary);
  color: #fff; border: none; border-radius: 50%;
  font-size: 1.2rem; cursor: pointer;
  box-shadow: 0 4px 18px rgba(100,50,10,0.3);
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  z-index: 999;
}
#scroll-top.show { opacity: 1; transform: translateY(0); }
#scroll-top:hover { background: var(--primary-dk); transform: translateY(-3px); }

/* ── Hero animations ── */
@keyframes fadeInDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInUp   { from { opacity:0; transform:translateY(30px);  } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn     { from { opacity:0; } to { opacity:1; } }

.animate-tag  { animation: fadeInDown 0.7s ease 0.3s both; }
.animate-h1   { animation: fadeInUp  0.8s ease 0.5s both; }
.animate-sub  { animation: fadeInUp  0.8s ease 0.7s both; }
.animate-btns { animation: fadeInUp  0.8s ease 0.9s both; }
.animate-stats{ animation: fadeInUp  0.8s ease 1.1s both; }
.animate-visual { animation: fadeIn  1s ease 0.6s both; }

/* ── Feature strip reveal ── */
.feature-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.feature-item.visible { opacity: 1; transform: translateY(0); }

/* ── Logo hover ── */
nav .logo img { transition: transform 0.35s ease; }
nav .logo:hover img { transform: rotate(8deg) scale(1.1); }

/* ── Section title ── */
.section-title {
  position: relative;
  display: block;
  width: 100%;
  text-align: center;
  left: auto;
  transform: none;
}
.section-title::after {
  content: '';
  display: block;
  width: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 99px;
  margin: 8px auto 0;
  transition: width 0.6s ease;
}
.section-title.visible::after { width: 80px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero { padding: 60px 24px 40px; min-height: auto; }
  .hero h1 { font-size: 2.2rem; }
  .feature-strip { gap: 10px; padding: 16px 20px; }
  .feature-divider { display: none; }
}
