/* ============================================
   HAIR BY PARADISO — MOTION LAYER
   Detected theme (from style.css's :root): primary/dark = --black (#050505),
   accent/brand = --gold (#C9974D), background = --black, text = --white.
   Fonts: Playfair Display (headings), Montserrat (body) — also from style.css.
   The --anim-* variables below just alias those exact values so every rule
   in this file stays locked to the real theme even if it changes later.
   Everything here only animates transform/opacity/clip-path (plus
   background-color and box-shadow on hover) to stay smooth at 60fps.
   ============================================ */
:root {
  --anim-primary: var(--black, #050505);
  --anim-accent: var(--gold, #C9974D);
  --anim-bg: var(--black, #050505);
  --anim-text: var(--white, #ffffff);

  /* ============ MOTION SYSTEM (Phase 6) ============
     ONE easing, THREE durations. Every new/updated rule below uses
     these — see PARADISO_MOTION in premium.js for the JS-side mirror
     (GSAP durations, stagger steps) so CSS and GSAP never drift apart. */
  --anim-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 0.25s;   /* hover/focus feedback — buttons, links, inputs */
  --duration-base: 0.45s;   /* standard UI transitions — cards, header, menus */
  --duration-slow: 0.8s;    /* entrances — reveal-on-scroll, headline rises */
}

/* ============ REVEAL-ON-SCROLL PRIMITIVES ============ */
/* Phase 3 bug fix: this used to carry a permanent `will-change`, and
   since .reveal gets auto-applied to dozens of elements per page
   (every section/card/FAQ item), that forced a separate GPU
   compositing layer for every single one of them at all times —
   a real, measurable contributor to the scroll stutter. JS now adds
   will-change only for the ~800ms the transition is actually running
   (see animations.js) and removes it again straight after. */
.reveal {
  opacity: 0;
  transition: opacity .8s cubic-bezier(0.22, 1, 0.36, 1), transform .8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal-up { transform: translateY(28px); }
.reveal-down { transform: translateY(-20px); }
.reveal-left { transform: translateX(-32px); }
.reveal-right { transform: translateX(32px); }
.reveal-scale { transform: scale(.94); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Stagger helper: children get --reveal-delay set inline by JS, this is the fallback. */
.stagger > * { transition-delay: var(--reveal-delay, 0s); }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* ============ PRELOADER / CONTENT REVEAL ============ */
/* #am-page-content wraps the header/content/footer (not the preloader
   itself, which is appended straight to <body>), so hiding it while the
   preloader plays never hides the preloader too. */
#am-page-content { opacity: 1; transition: opacity .5s var(--anim-ease); }
html.am-preloading #am-page-content {
  opacity: 0;
  transition: none;
  /* Safety net: if animations.js never loads/runs for any reason, this
     forces the content visible after 3s regardless — nothing stays
     hidden just because a script failed. No-op when JS runs normally,
     since JS removes the am-preloading class well before 3s. */
  animation: amForceReveal 0s 3s forwards;
}
@keyframes amForceReveal { to { opacity: 1; } }

/* ============ LAZY IMAGE FADE-IN ============ */
img:not(.img-loaded) { opacity: 0; }
img.img-loaded {
  opacity: 1;
  transition: opacity .6s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  img:not(.img-loaded) { opacity: 1; }
}

/* ============ HEADER SCROLL BEHAVIOUR ============ */
.main-nav {
  transition: transform .4s cubic-bezier(0.22, 1, 0.36, 1), background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.main-nav.is-scrolled {
  background-color: rgba(5,5,5,.88);
  /* Phase 3 bug fix: was blur(10px) — a fixed header is on screen for
     every scroll frame, so a heavy blur there is re-composited
     continuously and was a real contributor to the scroll stutter.
     Lighter blur + a touch more opacity keeps the same frosted look. */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 12px 28px rgba(0,0,0,.45);
}
.main-nav.is-hidden { transform: translateY(-100%); }

/* ============ NAV LINK HOVER UNDERLINE ============ */
.nav-link { position: relative; overflow: visible; }
.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.nav-link:hover::before,
.nav-link:focus-visible::before { transform: scaleX(1); }

/* ============ MOBILE MENU STAGGER ============ */
@media (max-width: 1024px) {
  .nav-menu .nav-link,
  .nav-menu .nav-dropdown {
    opacity: 0;
    transform: translateX(16px);
    transition: opacity .35s cubic-bezier(0.22, 1, 0.36, 1), transform .35s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .nav-menu.open .nav-link,
  .nav-menu.open .nav-dropdown {
    opacity: 1;
    transform: none;
  }
  .nav-menu.open .nav-link:nth-child(1), .nav-menu.open .nav-dropdown:nth-child(1) { transition-delay: .05s; }
  .nav-menu.open .nav-link:nth-child(2), .nav-menu.open .nav-dropdown:nth-child(2) { transition-delay: .1s; }
  .nav-menu.open .nav-link:nth-child(3), .nav-menu.open .nav-dropdown:nth-child(3) { transition-delay: .15s; }
  .nav-menu.open .nav-link:nth-child(4), .nav-menu.open .nav-dropdown:nth-child(4) { transition-delay: .2s; }
  .nav-menu.open .nav-link:nth-child(5), .nav-menu.open .nav-dropdown:nth-child(5) { transition-delay: .25s; }
  .nav-menu.open .nav-link:nth-child(6), .nav-menu.open .nav-dropdown:nth-child(6) { transition-delay: .3s; }
  .nav-backdrop {
    transition: opacity .35s ease, visibility .35s ease;
    backdrop-filter: blur(2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-menu .nav-link, .nav-menu .nav-dropdown { opacity: 1; transform: none; transition: none; }
}

/* ============ BUTTON MICRO-INTERACTIONS ============ */
.btn {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.3), transparent);
  transform: skewX(-18deg);
  transition: left .65s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.btn:hover::after { left: 130%; }
/* --am-magnet-x/y are set by JS on desktop (mouse-follow "magnetic" pull);
   they default to 0px so the lift below is identical with JS disabled. */
.btn:hover { transform: translateY(-2px) translate(var(--am-magnet-x, 0px), var(--am-magnet-y, 0px)); box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.btn:active { transform: translateY(0) scale(.97); box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.btn:focus-visible { box-shadow: 0 0 0 4px rgba(201,151,77,.25); }

/* ============ CARD HOVER LIFT ============ */
/* These add a soft shadow lift on top of whatever hover each card already had
   (several already had their own translateY/border-color on :hover in style.css —
   left untouched here, only box-shadow is layered in so nothing is overridden). */
.product-card, .category-card, .review-card, .catalog-card, .value-card, .split-item {
  transition: transform .4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .4s cubic-bezier(0.22, 1, 0.36, 1), border-color .25s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px rgba(0,0,0,.4);
}
.review-card:hover, .split-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(0,0,0,.4);
}
.category-card:hover, .catalog-card:hover, .value-card:hover {
  box-shadow: 0 18px 34px rgba(0,0,0,.4);
}
@media (prefers-reduced-motion: reduce) {
  .product-card, .category-card, .review-card, .catalog-card, .value-card, .split-item { transition: none; }
}

/* ============ KEN BURNS (static hero/banner backgrounds) ============ */
@keyframes kenBurnsZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}
.kb-zoom {
  animation: kenBurnsZoom 18s cubic-bezier(0.22, 1, 0.36, 1) infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .kb-zoom { animation: none; }
}

/* ============ HERO TEXT ENTRANCE ============ */
/* .hero-title is deliberately NOT in this list — its word-by-word rise is
   handled entirely by the .am-word-mask system (see animations.js), which
   needs the heading itself to stay at its natural opacity:1. */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
/* .hero-video-content > a.btn matches the actual button script.js renders
   for the home hero (there's no .hero-buttons wrapper in that markup —
   .hero-buttons only exists in the no-JS fallback, which gets replaced). */
.hero-eyebrow, .hero-line, .hero-desc, .hero-video-content > a.btn, .hero-buttons {
  opacity: 0;
  animation: heroFadeUp .8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-slide.active .hero-eyebrow { animation-delay: .1s; }
.hero-slide.active .hero-line { animation-delay: .55s; }
.hero-slide.active .hero-desc { animation-delay: .7s; }
.hero-slide.active .hero-video-content > a.btn,
.hero-slide.active .hero-buttons { animation-delay: .85s; }
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow, .hero-line, .hero-desc, .hero-video-content > a.btn, .hero-buttons { opacity: 1; animation: none; }
}

/* ============ SCROLL-DOWN INDICATOR ============ */
.scroll-indicator {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 14px;
  z-index: 5;
}
.scroll-indicator::before {
  content: '';
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--gold);
  border-radius: 2px;
  animation: scrollDot 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
@keyframes scrollDot {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-indicator::before { animation: none; opacity: 1; }
}

/* ============ FORM FOCUS GLOW ============ */
/* Phase 6 jury-fix #5: plain inputs got an animated underline that
   draws in from the center on focus, on top of the existing glow —
   no markup changes needed, so every form on the site (contact,
   newsletter, coupon box, login/signup) picks it up automatically. */
input, select, textarea {
  transition: border-color var(--duration-fast) var(--anim-ease), box-shadow var(--duration-fast) var(--anim-ease), background-size var(--duration-base) var(--anim-ease);
  background-image: linear-gradient(90deg, var(--anim-accent), var(--anim-accent));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: center bottom;
}
input:focus-visible, select:focus-visible, textarea:focus-visible,
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,151,77,.18);
  background-size: 100% 2px;
}
@media (prefers-reduced-motion: reduce) {
  input, select, textarea { transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease; background-size: 0% 2px !important; }
}

/* ============ BUTTON LOADING STATE (Phase 6, jury-fix #5/#11) ============ */
.btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading::after { left: -60%; animation: none; opacity: 0; } /* suspend the shine sweep while loading */
.btn-spinner {
  display: inline-block; width: 12px; height: 12px; margin-left: 8px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: currentColor;
  border-radius: 50%;
  animation: pmSpin .6s linear infinite;
  vertical-align: -2px;
}
@keyframes pmSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation: none; }
}

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold-dark);
  box-shadow: 0 10px 24px rgba(0,0,0,.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s cubic-bezier(0.22, 1, 0.36, 1), transform .3s cubic-bezier(0.22, 1, 0.36, 1), visibility .3s;
  z-index: 250;
}
.back-to-top svg.back-to-top-arrow {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
  position: relative; z-index: 1;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--gold-dark); transform: translateY(-3px); }
.back-to-top:active { transform: translateY(0) scale(.95); }
@media (max-width: 640px) {
  .back-to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }
}

/* Circular scroll-progress ring drawn around the back-to-top button */
.back-to-top-ring {
  position: absolute; inset: -1px;
  width: calc(100% + 2px); height: calc(100% + 2px);
  transform: rotate(-90deg);
  pointer-events: none;
}
.back-to-top-ring circle {
  fill: none;
  stroke-width: 2.5;
}
.back-to-top-ring .ring-track { stroke: rgba(5,5,5,.25); }
.back-to-top-ring .ring-progress {
  stroke: var(--anim-bg);
  stroke-linecap: round;
  transition: stroke-dashoffset .1s linear;
}

/* ============ CINEMATIC INTRO (Phase 5, effect 1 — replaces the old
   letter-by-letter preloader) ============ */
.am-preloader {
  position: fixed; inset: 0;
  z-index: 10000;
  background: var(--anim-primary);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transform: translateY(0);
  transition: transform .7s var(--anim-ease);
}
.am-preloader.is-exiting { transform: translateY(-100%); }

.am-intro-stack {
  position: relative;
  width: min(42vw, 360px);
  height: min(56vw, 480px);
  perspective: 900px;
}
.am-intro-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border: 1px solid var(--gold-line, rgba(201,151,77,.28));
  opacity: 0;
  transform: scale(.82) rotate(-6deg);
  transition: opacity .35s ease, transform .5s var(--anim-ease);
}
.am-intro-img:nth-child(even) { transform: scale(.82) rotate(6deg); }
.am-intro-img.is-active {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  z-index: 2;
  transition: opacity .25s ease, transform .4s var(--anim-ease);
}
/* Finale: the last image expands to fill the whole screen, becoming the
   handoff into the real hero underneath (which crossfades in via
   #am-page-content as .am-preloader itself fades/slides out). */
.am-intro-stack.is-finale { width: 100vw; height: 100vh; perspective: none; }
.am-intro-img.is-finale {
  transform: scale(1) rotate(0deg);
  transition: transform .5s var(--anim-ease);
  border: 0;
}

.am-intro-skip {
  position: absolute; right: 26px; bottom: 26px;
  z-index: 3;
  color: var(--anim-text);
  font: 600 10px var(--font-sans, sans-serif);
  letter-spacing: 1.6px;
  padding: 10px 16px;
  border: 1px solid var(--gold-line, rgba(201,151,77,.28));
  background: transparent;
  opacity: .75;
  transition: opacity var(--duration-fast) var(--anim-ease), border-color var(--duration-fast) var(--anim-ease), background-color var(--duration-fast) var(--anim-ease), transform var(--duration-fast) var(--anim-ease);
}
.am-intro-skip:hover { opacity: 1; border-color: var(--anim-accent); background: rgba(201,151,77,.1); }
.am-intro-skip:active { transform: scale(.95); }
.am-intro-skip:focus-visible { opacity: 1; outline: 2px solid var(--anim-accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .am-preloader { display: none; }
}
@media (max-width: 640px) {
  .am-intro-stack { width: min(62vw, 280px); height: min(80vw, 360px); }
}

/* Phase 8 effect 1 replaced the old letter-scatter fly-in that used to be
   styled here (it only ever ran once, right after the cinematic intro) —
   the hero now always uses the same one-word-per-line rise below,
   whether or not the intro played. See cue-hero.css for that. */

/* ============ SCROLL PROGRESS BAR ============ */
.am-progress-bar {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: var(--anim-accent);
  z-index: 9998;
  transition: width .1s linear;
}

/* ============ CUSTOM CURSOR (desktop only) ============ */
/* Deliberately layered ON TOP of the normal OS cursor rather than hiding it
   (no `cursor: none` anywhere) — if this script ever misbehaves, the
   visitor still always has a real, visible cursor to navigate the shop. */
.am-cursor-dot, .am-cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}
.am-cursor-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--anim-accent);
}
.am-cursor-ring {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--anim-accent);
  transition: width .25s var(--anim-ease), height .25s var(--anim-ease), opacity .25s var(--anim-ease), border-color .25s var(--anim-ease);
}
.am-cursor-ring.is-active {
  width: 54px; height: 54px;
  background: rgba(201,151,77,.12);
}
@media (max-width: 1024px), (pointer: coarse) {
  .am-cursor-dot, .am-cursor-ring { display: none; }
}

/* ============ HEADING / HERO WORD-MASK REVEAL ============ */
.am-word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.am-word {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform .8s var(--anim-ease), opacity .8s var(--anim-ease);
  transition-delay: calc(var(--i, 0) * 0.06s);
}
.am-word-mask.is-visible .am-word { transform: translateY(0); opacity: 1; }
.am-heading-underline {
  display: block;
  width: 0; height: 2px;
  margin-top: 10px;
  background: var(--anim-accent);
  transition: width .6s var(--anim-ease);
  transition-delay: .2s;
}
.am-heading-underline.align-center { margin-left: auto; margin-right: auto; }
.am-heading-underline.is-visible { width: 46px; }
@media (prefers-reduced-motion: reduce) {
  .am-word { transform: none; opacity: 1; transition: none; }
  .am-heading-underline { width: 46px; transition: none; }
}

/* ============ IMAGE CURTAIN REVEAL ============ */
.am-curtain-img {
  clip-path: inset(0 0 0 100%);
  transform: scale(1.06);
  transition: clip-path 1s var(--anim-ease), transform 1s var(--anim-ease);
}
.am-curtain-img.is-visible { clip-path: inset(0 0 0 0%); transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
  .am-curtain-img { clip-path: none; transform: none; transition: none; }
}

/* ============ CARD 3D TILT (desktop only) ============ */
/* JS only ever sets --am-tilt-x/--am-tilt-y (defaulting to 0deg below), so
   each card's ORIGINAL hover lift amount from style.css is reproduced here
   unchanged and just gains a perspective-rotate on top of it. At rest
   (mouse not moved yet) this renders pixel-identical to the original. */
@media (min-width: 1025px) and (pointer: fine) {
  /* will-change is added/removed by animations.js only while a card is
     actually being hovered (see the tilt handler), not permanently. */
  .product-card:hover { transform: translateY(-6px) perspective(900px) rotateX(var(--am-tilt-x, 0deg)) rotateY(var(--am-tilt-y, 0deg)); }
  .category-card:hover { transform: translateY(-3px) perspective(900px) rotateX(var(--am-tilt-x, 0deg)) rotateY(var(--am-tilt-y, 0deg)); }
  .catalog-card:hover { transform: translateY(-4px) perspective(900px) rotateX(var(--am-tilt-x, 0deg)) rotateY(var(--am-tilt-y, 0deg)); }
  .value-card:hover { transform: translateY(-5px) perspective(900px) rotateX(var(--am-tilt-x, 0deg)) rotateY(var(--am-tilt-y, 0deg)); }
  .review-card:hover { transform: translateY(-4px) perspective(900px) rotateX(var(--am-tilt-x, 0deg)) rotateY(var(--am-tilt-y, 0deg)); }
}

/* ============ BUTTON MAGNETIC + RIPPLE ============ */
.btn { transition: transform .25s var(--anim-ease), box-shadow .25s var(--anim-ease), background-color .25s ease, border-color .25s ease, color .25s ease; }
.am-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  transform: scale(0);
  opacity: .6;
  pointer-events: none;
  animation: amRippleOut .6s var(--anim-ease);
}
@keyframes amRippleOut {
  to { transform: scale(2.6); opacity: 0; }
}

/* ============ MARQUEE STRIP ============ */
.am-marquee {
  background: var(--anim-primary);
  overflow: hidden;
  border-bottom: 1px solid var(--gold-line, rgba(201,151,77,.28));
  border-top: 1px solid var(--gold-line, rgba(201,151,77,.28));
}
.am-marquee-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  padding: 14px 0;
  animation: amMarqueeScroll 26s linear infinite;
}
.am-marquee:hover .am-marquee-track { animation-play-state: paused; }
.am-marquee-item {
  color: var(--anim-text);
  font: 600 11px var(--font-sans, sans-serif);
  letter-spacing: 1.4px;
  padding: 0 18px;
  flex-shrink: 0;
}
.am-marquee-item em {
  color: var(--anim-accent);
  font-style: normal;
  margin-left: 18px;
}
@keyframes amMarqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .am-marquee-track { animation: none; }
}

/* ============ SELECTION + SCROLLBAR POLISH ============ */
::selection { background: var(--anim-accent); color: var(--anim-primary); }
html { scrollbar-color: var(--anim-accent) var(--anim-bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--anim-bg); }
::-webkit-scrollbar-thumb { background: var(--anim-accent); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--anim-primary); }
