/* ═══════════════════════════════════════════════════════
   Olfère · Magic Layer  v1  (2026-08-15)
   Candle glow / 3D tilt / View transitions / Ambient
═══════════════════════════════════════════════════════ */

/* ── View transitions ────────────────────────────────── */
::view-transition-group(*),
::view-transition-group(root) {
  animation-duration: .55s;
  animation-timing-function: cubic-bezier(.16,1,.3,1);
}
::view-transition-old(root) {
  animation: magic-page-out .2s ease-out forwards;
}
::view-transition-new(root) {
  animation: magic-page-in .44s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes magic-page-out {
  to { opacity: 0; transform: scale(.99) translateY(-5px); }
}
@keyframes magic-page-in {
  from { opacity: 0; transform: scale(1.01) translateY(7px); }
}

/* ── Card tilt 3D support ────────────────────────────── */
[data-portfolio-grid] .product-card,
[data-featured-products] .product-card {
  transition: transform .1s ease-out, box-shadow .4s ease;
  will-change: auto;
}
[data-portfolio-grid] .product-card:hover,
[data-featured-products] .product-card:hover {
  will-change: transform;
}

/* ── Button shimmer sweep ────────────────────────────── */
.button {
  position: relative;
  overflow: hidden;
}
.button::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -160%;
  width: 48%;
  height: 120%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,.22) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  pointer-events: none;
  transition: left .6s ease;
}
.button:hover::before { left: 180%; }

/* ── Hero note gentle float ──────────────────────────── */
@keyframes magic-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
.hero-note {
  animation: magic-float 7s ease-in-out infinite;
}

/* ── Scroll reveal: smoother cubic-bezier ────────────── */
.reveal {
  transition: opacity .75s ease, transform .75s cubic-bezier(.16,1,.3,1) !important;
}

/* ── Favorite heart pulse ────────────────────────────── */
@keyframes magic-heart {
  0%  { transform: scale(1); }
  38% { transform: scale(1.3); }
  65% { transform: scale(.94); }
  100%{ transform: scale(1); }
}
.product-favorite.is-selected {
  animation: magic-heart .38s cubic-bezier(.34,1.56,.64,1);
}

/* ── Scroll progress subtle glow ─────────────────────── */
.wow-scroll-progress span {
  filter: drop-shadow(0 0 4px rgba(169,139,101,.6));
}

/* ── Section link hover refinement ──────────────────── */
.text-link:hover { color: var(--bronze-dark); }

/* ── Line cards: shimmer on hover ───────────────────── */
.line-card {
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease;
}
.line-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 64px rgba(64,49,31,.11);
}
.line-card--premium:hover {
  box-shadow: 0 26px 64px rgba(0,0,0,.22);
}

/* ── Social gallery: stronger hover ─────────────────── */
.social-gallery__tile {
  transition: transform .4s cubic-bezier(.16,1,.3,1);
}
.social-gallery__tile:hover,
.social-gallery__tile:focus-visible {
  transform: scale(1.02);
}

/* ── Value cards: hover lift ─────────────────────────── */
.value-card {
  transition: border-color .25s ease, background .25s ease;
}
.section--ink .value-card:hover {
  background: rgba(255,255,255,.04);
}

/* ── Grain texture overlay (ultra-subtle) ────────────── */
.magic-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 280px 280px;
}

/* ── Reduced motion: disable all magic ───────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-note { animation: none !important; }
  .button::before { display: none !important; }
  .magic-grain { display: none !important; }
  .line-card, .social-gallery__tile { transition: none !important; transform: none !important; }
  [data-portfolio-grid] .product-card,
  [data-featured-products] .product-card { transition: none !important; }
  .product-favorite.is-selected { animation: none !important; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none !important; }
}
