/* ==========================================================================
   REMZ — Atelier Light enhancement layer
   Additive stylesheet. Loads after styles.css on every page.
   Theme: jewellery is worked light — sheen, glint, and unhurried motion.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap");

/* --------------------------------------------------------------------------
   1. Typography lift
   The original serif stack (Didot → Times New Roman) renders plain on most
   Windows/Android machines. Cormorant Garamond restores the intended
   high-contrast luxury serif everywhere, with graceful fallback.
   -------------------------------------------------------------------------- */
.headline,
.about-credentials dd,
.about-section h2,
.catalog-copy h1,
.catalog-title-row h1,
.checkout-review h1, .checkout-payment h2, .checkout-empty h2,
.contact-hero h1,
.contact-holding h1,
.contact-option h2, .contact-form h2,
.contact-social-strip strong,
.craft-stat strong,
.favourite-copy h2,
.favourites-intro h1, .favourites-empty h2, .pay-panel h1, .pay-summary h2,
.footer-heading,
.footer-contact-title,
.footer-monogram,
.footer-studio p,
.hallmark-section h2,
.philosophy-copy h2,
.product-index,
.product-listing .product-name,
.product-meta strong,
.shop-area-title,
.shop-detail h1,
.staff-login-panel h1, .staff-dashboard-copy h1,
.staff-preview h2,
.staff-uploaded h2,
.staff-uploaded-meta strong,
.suggested-copy h3,
.trust-item h3 {
  font-family: "Cormorant Garamond", Didot, "Bodoni 72", "Bodoni MT", Baskerville, "Times New Roman", serif;
}

.headline {
  font-weight: 600;
  letter-spacing: 0.005em;
}

.philosophy-copy h2 em,
.hallmark-section h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold-deep);
}

/* --------------------------------------------------------------------------
   2. Scroll progress hairline — a drawn gold thread along the top
   -------------------------------------------------------------------------- */
.remz-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 2000;
  pointer-events: none;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 55%, var(--gold-soft));
  transform-origin: left center;
  transform: scaleX(var(--scroll-progress, 0));
}

/* --------------------------------------------------------------------------
   3. Diamond-dust — twinkling glints over the homepage hero
   -------------------------------------------------------------------------- */
.remz-dust {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. Word-by-word headline reveals with a gold sheen pass
   JS splits qualifying headings into .remz-word > span structure.
   -------------------------------------------------------------------------- */
.remz-split .remz-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.remz-split .remz-word > span {
  display: inline-block;
  transform: translateY(112%);
  opacity: 0;
  filter: blur(5px);
}

.remz-split.remz-in .remz-word > span {
  animation: remzWordRise 1050ms var(--ease-dramatic, cubic-bezier(0.16, 1, 0.3, 1)) forwards;
  animation-delay: calc(var(--wi, 0) * 90ms);
}

@keyframes remzWordRise {
  to {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0);
  }
}

/* one-time sheen that sweeps across the heading once the words have landed */
.remz-split.remz-in::after {
  content: "";
  position: absolute;
  inset: -0.1em -0.2em;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(234, 220, 170, 0.0) 42%,
    rgba(200, 162, 74, 0.22) 50%,
    rgba(234, 220, 170, 0.0) 58%,
    transparent 70%
  );
  background-size: 240% 100%;
  background-position: 120% 0;
  mix-blend-mode: multiply;
  animation: remzSheenPass 1400ms ease-out forwards;
  animation-delay: calc(var(--wc, 3) * 90ms + 350ms);
}

.remz-split {
  position: relative;
}

@keyframes remzSheenPass {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

/* --------------------------------------------------------------------------
   5. Generic rise-in for elements tagged by JS on pages without
      scroll-reveal markup (shop, catalog, contact, legal, checkout)
   -------------------------------------------------------------------------- */
.remz-rise {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 900ms var(--ease-luxury, cubic-bezier(0.19, 1, 0.22, 1)),
    transform 900ms var(--ease-luxury, cubic-bezier(0.19, 1, 0.22, 1));
  transition-delay: calc(var(--ri, 0) * 70ms);
  will-change: opacity, transform;
}

.remz-rise.remz-in {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   6. Lustre — a pointer-tracked light pooling across cards,
      the way a polished surface catches a lamp
   -------------------------------------------------------------------------- */
.remz-lustre {
  position: relative;
}

.remz-sheen {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 420ms ease;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.5),
    rgba(200, 162, 74, 0.13) 38%,
    transparent 64%
  );
  mix-blend-mode: soft-light;
}

.remz-lustre:hover .remz-sheen,
.remz-lustre:focus-within .remz-sheen {
  opacity: 1;
}

/* dark cards (shop area tiles) want a brighter pool */
.shop-area-card .remz-sheen {
  mix-blend-mode: screen;
  background: radial-gradient(
    300px circle at var(--mx, 50%) var(--my, 50%),
    rgba(234, 220, 170, 0.28),
    rgba(200, 162, 74, 0.1) 42%,
    transparent 66%
  );
}

/* tilt is applied by JS as an inline transform; smooth its release */
.remz-tilt {
  transition: transform 600ms var(--ease-luxury, cubic-bezier(0.19, 1, 0.22, 1));
}

.remz-tilt.remz-tilting {
  transition: transform 140ms ease-out;
}

/* --------------------------------------------------------------------------
   7. Button shine — a light pass across primary actions on hover
   -------------------------------------------------------------------------- */
.shop-button,
.shop-area-enter,
.detail-add-button,
.checkout-pay-button,
.contact-form button[type="submit"] {
  position: relative;
  overflow: hidden;
}

.shop-button::after,
.shop-area-enter::after,
.detail-add-button::after,
.checkout-pay-button::after,
.contact-form button[type="submit"]::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -45%;
  width: 38%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 255, 255, 0.36) 48%,
    rgba(234, 220, 170, 0.5) 52%,
    transparent
  );
  transform: skewX(-18deg) translateX(-140%);
  pointer-events: none;
}

.shop-button:hover::after,
.shop-area-enter:hover::after,
.shop-area-card:hover .shop-area-enter::after,
.detail-add-button:hover::after,
.checkout-pay-button:hover::after,
.contact-form button[type="submit"]:hover::after {
  animation: remzButtonShine 900ms var(--ease-luxury, cubic-bezier(0.19, 1, 0.22, 1)) forwards;
}

@keyframes remzButtonShine {
  to {
    transform: skewX(-18deg) translateX(540%);
  }
}

/* --------------------------------------------------------------------------
   8. Marquee polish — slows and gilds under the pointer
   -------------------------------------------------------------------------- */
.atelier-marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  transition: color 360ms ease;
}

.marquee-track span:hover {
  color: var(--gold-deep);
}

/* --------------------------------------------------------------------------
   9. Page veil — soft crossfade between internal pages
   -------------------------------------------------------------------------- */
.remz-veil {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--page-bg, #fcfbf8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

html.remz-leaving .remz-veil {
  opacity: 1;
  pointer-events: auto;
}

html.remz-entering .remz-veil {
  opacity: 1;
  transition: none;
}

/* --------------------------------------------------------------------------
   10. Badge pop when cart / favourites count changes
   -------------------------------------------------------------------------- */
.remz-badge-pop {
  animation: remzBadgePop 520ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes remzBadgePop {
  0% { transform: scale(1); }
  35% { transform: scale(1.55); }
  100% { transform: scale(1); }
}

/* --------------------------------------------------------------------------
   11. Hero entrance refinements (index only)
   -------------------------------------------------------------------------- */
.remz-home .eyebrow {
  opacity: 0;
  animation: remzFadeUp 1100ms var(--ease-luxury, cubic-bezier(0.19, 1, 0.22, 1)) 250ms forwards;
}

.remz-home .hero-intro {
  opacity: 0;
  animation: remzFadeUp 1100ms var(--ease-luxury, cubic-bezier(0.19, 1, 0.22, 1)) 750ms forwards;
}

.remz-home .hero-notes p {
  opacity: 0;
  animation: remzFadeUp 1100ms var(--ease-luxury, cubic-bezier(0.19, 1, 0.22, 1)) forwards;
}

.remz-home .hero-notes p:nth-child(1) { animation-delay: 950ms; }
.remz-home .hero-notes p:nth-child(2) { animation-delay: 1100ms; }

.remz-home .shop-button {
  opacity: 0;
  animation: remzFadeUp 1100ms var(--ease-luxury, cubic-bezier(0.19, 1, 0.22, 1)) 1250ms forwards;
}

@keyframes remzFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* gentle parallax drift on the hero film as you scroll */
.remz-home .hero-video-wrap {
  transform: translateY(calc(var(--hero-drift, 0) * 1px));
  will-change: transform;
}

/* --------------------------------------------------------------------------
   12. Reduced motion: the whole layer steps aside
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .remz-split .remz-word > span {
    transform: none;
    opacity: 1;
    filter: none;
    animation: none !important;
  }

  .remz-split.remz-in::after {
    animation: none !important;
    content: none;
  }

  .remz-rise {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .remz-home .eyebrow,
  .remz-home .hero-intro,
  .remz-home .hero-notes p,
  .remz-home .shop-button {
    opacity: 1;
    animation: none !important;
  }

  .remz-home .hero-video-wrap {
    transform: none;
  }

  .remz-sheen,
  .remz-progress,
  .remz-dust {
    display: none;
  }

  .remz-tilt {
    transition: none;
  }

  .shop-button::after,
  .shop-area-enter::after,
  .detail-add-button::after,
  .checkout-pay-button::after,
  .contact-form button[type="submit"]::after {
    content: none;
  }

  .remz-veil {
    display: none;
  }
}
