/* Орехи Мечты · v46 motion layer.
   The layout stays still. Decoration uses transform/opacity inside reserved
   panels, independently from the carousel's image-change animation.
   Visible scenes run on phones, tablets and desktops; hidden scenes pause. */
:root {
  --dn-motion-ease: cubic-bezier(.2,.7,.2,1);
  --dn-motion-gold: #ffdc59;
}

@keyframes dn-v46-star-turn {
  0%, 12% { transform: rotate(0deg); }
  60%, 100% { transform: rotate(180deg); }
}
@keyframes dn-v46-halo-drift {
  0%, 100% { transform: translate3d(-6px,5px,0) scale(.94); opacity: .62; }
  50% { transform: translate3d(7px,-7px,0) scale(1.06); opacity: .94; }
}
@keyframes dn-v46-ring {
  0%, 14% { transform: scale(.95); opacity: .5; }
  72%, 100% { transform: scale(1.35); opacity: 0; }
}
@keyframes dn-v46-edge {
  0%, 100% { opacity: .1; }
  50% { opacity: .6; }
}
@keyframes dn-v46-logo-light {
  0%, 100% { opacity: 1; }
  50% { opacity: .82; }
}
@keyframes dn-v46-calm-light {
  0%, 100% { opacity: .92; }
  50% { opacity: 1; }
}
@keyframes dn-v46-tap-label {
  0%, 100% { opacity: 0; }
  20%, 75% { opacity: 1; }
}

/* A small recognisable star brings motion to headings, including articles. */
html[data-motion-preference="on"] .dn-eyebrow[data-dn-motion-scene]::before {
  flex: 0 0 auto;
  transform-origin: 50% 50%;
  animation: dn-v46-star-turn 18s var(--dn-motion-ease) infinite;
  animation-play-state: paused;
}
html[data-motion-preference="on"] .dn-eyebrow[data-dn-motion-visible="true"]::before {
  animation-play-state: running;
}

/* A low-contrast halo moves behind the products, keeping labels unobstructed.
   Each parent already clips its artwork; no package receives a new transform. */
html[data-motion-preference="on"] :is(.dn-card-image,.dn-collection-art,.dn-product-visual)[data-dn-motion-scene]::before {
  content: "";
  display: block;
  position: absolute;
  inset: 8%;
  z-index: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #ffdc592b 0%, #b991e51a 45%, transparent 72%);
  pointer-events: none;
  animation: dn-v46-halo-drift 11s ease-in-out infinite !important;
  animation-play-state: paused !important;
}
html[data-motion-preference="on"] :is(.dn-card-image,.dn-collection-art,.dn-product-visual)[data-dn-motion-scene]>:is(img,.dn-tag) {
  /* Grid items accept z-index without positioning. Keep the tag's inherited
     static position so legacy top/left offsets cannot shift its label. */
  z-index: 1;
}
html[data-motion-preference="on"] :is(.dn-card-image,.dn-collection-art,.dn-product-visual)[data-dn-motion-visible="true"]::before {
  animation-play-state: running !important;
}

/* Editorial frames breathe gently; card boxes and text never tilt or move. */
.dn-journal-card[data-dn-motion-scene] { position: relative; isolation: isolate; }
html[data-motion-preference="on"] .dn-journal-card[data-dn-motion-scene]::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid #7e4ab6;
  border-radius: inherit;
  pointer-events: none;
  opacity: .1;
  animation: dn-v46-edge 7.5s ease-in-out infinite;
  animation-play-state: paused;
}
html[data-motion-preference="on"] .dn-journal-card[data-dn-motion-visible="true"]::after {
  animation-play-state: running;
}

/* The play button is still a normal link until a visitor starts the film. */
.dn-film-play>span { position: relative; }
html[data-motion-preference="on"] .dn-film-screen[data-dn-motion-scene] .dn-film-play>span::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 2px solid var(--dn-motion-gold);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: dn-v46-ring 3.6s ease-out infinite;
  animation-play-state: paused;
}
html[data-motion-preference="on"] .dn-film-screen[data-dn-motion-visible="true"] .dn-film-play>span::after {
  animation-play-state: running;
}

/* Small contact accents use the empty space in the label row. */
.dn-contact-item[data-dn-motion-scene] { position: relative; }
html[data-motion-preference="on"] .dn-contact-item[data-dn-motion-scene]::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 29px;
  width: 14px;
  height: 14px;
  background: var(--caramel);
  clip-path: polygon(44% 0,56% 0,57% 34%,81% 10%,90% 19%,66% 43%,100% 44%,100% 56%,66% 57%,90% 81%,81% 90%,57% 66%,56% 100%,44% 100%,43% 66%,19% 90%,10% 81%,34% 57%,0 56%,0 44%,34% 43%,10% 19%,19% 10%,43% 34%);
  pointer-events: none;
  animation: dn-v46-star-turn 20s var(--dn-motion-ease) infinite;
  animation-play-state: paused;
}
html[data-motion-preference="on"] .dn-contact-item[data-dn-motion-visible="true"]::after {
  animation-play-state: running;
}
.dn-contact-grid>div:first-child>.dn-contact-item:first-child[data-dn-motion-scene]::after {
  top: 4px;
}

html[data-motion-preference="on"] .dn-footer-brand[data-dn-motion-scene] .dn-logo-symbol svg {
  animation: dn-v46-logo-light 8s ease-in-out infinite !important;
  animation-play-state: paused !important;
}
html[data-motion-preference="on"] .dn-footer-brand[data-dn-motion-visible="true"] .dn-logo-symbol svg {
  animation-play-state: running !important;
}

/* Touch feedback supplements automatic animation; no hover is required. */
html[data-motion-preference="on"] :is(.dn-stage-controls>button,.dn-card-arrow,.dn-collection-bottom>b) {
  transition: transform 180ms var(--dn-motion-ease), background-color 180ms ease;
}
html[data-motion-preference="on"] .dn-stage-controls>button:active {
  transform: scale(.94);
}
html[data-motion-preference="on"] :is(.dn-card:active .dn-card-arrow,.dn-collection-card:active .dn-collection-bottom>b) {
  transform: translate(2px,-2px);
}

/* Calm is still animated. System reduced-motion chooses light changes rather
   than scaling, drifting or a moving marquee; there is no viewport-size cutoff. */
html[data-motion-preference="on"][data-motion-intensity="calm"] :is(.dn-eyebrow,.dn-contact-item)[data-dn-motion-scene]::before,
html[data-motion-preference="on"][data-motion-intensity="calm"] .dn-contact-item[data-dn-motion-scene]::after,
html[data-motion-preference="on"][data-motion-intensity="calm"] :is(.dn-card-image,.dn-collection-art,.dn-product-visual)[data-dn-motion-scene]::before,
html[data-motion-preference="on"][data-motion-intensity="calm"] .dn-film-screen[data-dn-motion-scene] .dn-film-play>span::after {
  animation-name: dn-v46-calm-light !important;
  animation-duration: 10s !important;
}
html[data-motion-preference="on"][data-motion-intensity="calm"] .dn-new-stage .dn-pack-float,
html[data-motion-preference="on"][data-motion-intensity="calm"] :is(.dn-product-visual,.dn-card-image,.dn-collection-art)>img,
html[data-motion-preference="on"][data-motion-intensity="calm"] .dn-story-art .dn-story-packs>img,
html[data-motion-preference="on"][data-motion-intensity="calm"] .dn-journal-card>img,
html[data-motion-preference="on"][data-motion-intensity="calm"] .dn-new-stage .dn-stage-spark,
html[data-motion-preference="on"][data-motion-intensity="calm"] .dn-business::after {
  animation-name: dn-v46-calm-light !important;
  animation-duration: 10s !important;
}
html[data-motion-preference="on"][data-motion-intensity="calm"] .dn-marquee .dn-marquee-track {
  animation-name: dn-v46-calm-light !important;
  animation-duration: 10s !important;
}
html[data-motion-preference="on"][data-motion-intensity="calm"] .dn-pop-copy h1>span::after {
  animation: none !important;
}
html[data-motion-preference="on"][data-motion-intensity="calm"] .dn-new-stage .dn-crunch-word {
  transform: none;
  animation: dn-v46-tap-label 700ms ease-out forwards !important;
}

/* Hidden tabs freeze every decorative layer without discarding its phase. */
html.dn-motion-paused[data-motion-preference="on"] [data-dn-motion-scene]::before,
html.dn-motion-paused[data-motion-preference="on"] [data-dn-motion-scene]::after,
html.dn-motion-paused[data-motion-preference="on"] .dn-film-screen[data-dn-motion-scene] .dn-film-play>span::after,
html.dn-motion-paused[data-motion-preference="on"] .dn-footer-brand[data-dn-motion-scene] .dn-logo-symbol svg {
  animation-play-state: paused !important;
}
html[data-motion-preference="off"] [data-dn-motion-scene]::before,
html[data-motion-preference="off"] [data-dn-motion-scene]::after { animation: none !important; }

@media print {
  [data-dn-motion-scene]::before,
  [data-dn-motion-scene]::after,
  .dn-film-play>span::after { animation: none !important; }
}
