/* ============================================================
   premium-3d.css — Kallisto Portfolio Site
   3D depth, floating animations, shimmer, grain, glow, glare
   ============================================================ */

/* ─────────────────────────────────────────
   HERO — Ambient depth orbs
   ───────────────────────────────────────── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  will-change: transform;
}

.hero-orb-1 {
  width: 650px; height: 650px;
  top: -20%; right: -8%;
  background: radial-gradient(circle at 40% 40%, rgba(196, 168, 130, 0.20) 0%, transparent 65%);
  animation: orb-drift-1 11s ease-in-out infinite alternate;
}

.hero-orb-2 {
  width: 500px; height: 500px;
  bottom: -10%; left: 0%;
  background: radial-gradient(circle, rgba(196, 168, 130, 0.11) 0%, transparent 65%);
  animation: orb-drift-2 14s ease-in-out infinite alternate;
}

.hero-orb-3 {
  width: 280px; height: 280px;
  top: 35%; left: 42%;
  background: radial-gradient(circle, rgba(196, 168, 130, 0.16) 0%, transparent 65%);
  animation: orb-drift-3 7s ease-in-out infinite alternate;
  filter: blur(60px);
}

@keyframes orb-drift-1 {
  from { transform: translate(0, 0)    scale(1);    }
  to   { transform: translate(-45px, 35px) scale(1.18); }
}
@keyframes orb-drift-2 {
  from { transform: translate(0, 0)   scale(1.06); }
  to   { transform: translate(55px, -30px) scale(0.88); }
}
@keyframes orb-drift-3 {
  from { transform: translate(0, 0)   scale(0.88); }
  to   { transform: translate(-25px, 45px) scale(1.22); }
}

/* ─────────────────────────────────────────
   HERO — Film grain/noise texture
   ───────────────────────────────────────── */
.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─────────────────────────────────────────
   HERO — Shimmer text on accent em
   ───────────────────────────────────────── */
.hero-title em {
  background: linear-gradient(
    105deg,
    #C4A882 0%,
    #F0D9B0 30%,
    #FBF0DA 50%,
    #F0D9B0 70%,
    #C4A882 100%
  );
  background-size: 260% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-shimmer 4.5s linear infinite;
}

@keyframes text-shimmer {
  from { background-position:   0% center; }
  to   { background-position: 260% center; }
}

/* ─────────────────────────────────────────
   HERO SHOWCASE — floating entrance only
   ───────────────────────────────────────── */
.hero-showcase {
  will-change: opacity, transform;
}

/* ─────────────────────────────────────────
   PRODUCT CARDS — 3D tilt + glare
   ───────────────────────────────────────── */
.product-card {
  transform-style: preserve-3d;
  will-change: transform;
  overflow: visible; /* allow 3D shadow to spill */
}

/* Re-clip only the visual content (not the card itself) */
.product-card > .card-link {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Glare overlay — injected via JS */
.card-glare {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: overlay;
}

/* Shimmer border on hover */
.product-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-lg) + 1px);
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(196, 168, 130, 0) 25%,
    rgba(196, 168, 130, 0.4) 50%,
    rgba(196, 168, 130, 0) 75%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity var(--transition-luxury);
  pointer-events: none;
  z-index: 1;
}
.product-card:hover::before { opacity: 1; }

/* ─────────────────────────────────────────
   BUTTONS — Glint sweep on hover
   ───────────────────────────────────────── */
.btn-primary {
  overflow: hidden;
  position: relative;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -80%;
  width: 55%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 25%,
    rgba(255, 255, 255, 0.30) 50%,
    transparent 75%
  );
  transform: skewX(-15deg);
  pointer-events: none;
  transition: none;
}

.btn-primary:hover::after {
  animation: btn-glint 0.5s ease forwards;
}

@keyframes btn-glint {
  from { left: -80%; }
  to   { left: 130%; }
}

/* ─────────────────────────────────────────
   PILLARS — 3D tilt (JS-enhanced, CSS base)
   ───────────────────────────────────────── */
.pillar {
  transform-style: preserve-3d;
  will-change: transform;
}

.pillar-icon {
  transition: transform var(--transition-luxury);
}

.pillar:hover .pillar-icon {
  transform: translateZ(22px) scale(1.12);
}

/* ─────────────────────────────────────────
   STATS STRIP
   ───────────────────────────────────────── */
.stats-strip {
  background: var(--color-dark-bg);
  padding: 3.5rem 0;
  border-bottom: 0.5px solid rgba(247, 245, 242, 0.07);
  position: relative;
  overflow: hidden;
}

.stats-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(196, 168, 130, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
  padding: 2rem 1rem;
  border: 0.5px solid rgba(247, 245, 242, 0.08);
  border-radius: var(--radius-xl);
  background: rgba(247, 245, 242, 0.02);
  transition: border-color var(--transition-base), background var(--transition-base),
              transform var(--transition-luxury), box-shadow var(--transition-luxury);
}

.stat-item:hover {
  border-color: rgba(196, 168, 130, 0.35);
  background: rgba(196, 168, 130, 0.05);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.stat-number {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-dark-muted);
  line-height: 1.5;
}

/* ─────────────────────────────────────────
   CTA BANNER — Gold grid background
   ───────────────────────────────────────── */
.cta-banner {
  isolation: isolate;
}

.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(196, 168, 130, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 168, 130, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

/* ─────────────────────────────────────────
   LIFESTYLE BANNER — extra depth layer
   ───────────────────────────────────────── */
.lifestyle-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 50%, rgba(196, 168, 130, 0.10) 0%, transparent 55%);
  z-index: 2;
  pointer-events: none;
}

/* ─────────────────────────────────────────
   LOADER — upgraded to ring spinner
   ───────────────────────────────────────── */
.loader-ring {
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(196, 168, 130, 0.18);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: ring-spin 0.9s linear infinite;
  position: absolute;
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────
   REDUCED MOTION — disable all 3D
   ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-orb                         { animation: none !important; }
  .showcase-img                     { animation: none !important; opacity: 1 !important; transform: none !important; }
  .showcase-img:not(:first-child)   { opacity: 0 !important; }  /* show only first */
  .hero-title em                    { animation: none; background: var(--color-accent); -webkit-text-fill-color: var(--color-accent); }
  .btn-primary::after               { display: none; }
  .pillar:hover .pillar-icon        { transform: none; }
}

/* ─────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────── */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-number { font-size: 1.75rem; }
  .hero-orb-1 { width: 350px; height: 350px; }
  .hero-orb-2 { width: 250px; height: 250px; }
  .hero-orb-3 { display: none; }
}

@media (max-width: 480px) {
  .stats-strip { padding: 2.5rem 0; }
  .stats-grid  { gap: 0.5rem; }
  .stat-item   { padding: 1.25rem 0.75rem; }
  .stat-number { font-size: 1.4rem; }
  /* Orbs much smaller — preserve depth without eating layout space */
  .hero-orb-1  { width: 200px; height: 200px; filter: blur(55px); }
  .hero-orb-2  { width: 160px; height: 160px; }
}
