/* The original signature takes its place in the existing arrival, before the covers. */
.ding-brand-presentation{display:none}
/* Guard the first header paint before the parser has even reached the stage.
   The logo is revealed by a real phase, never by the stage's temporary absence. */
#site-brand{opacity:0;visibility:hidden;pointer-events:none}
body:not(:has(#arrival-stage)) :is(.host-entry,.account-button){opacity:0;visibility:hidden;pointer-events:none;transition:none}
body:has(#traveler-view:not([hidden]) #arrival-stage:is([data-phase=brand],[data-phase=backdrop],[data-phase=left],[data-phase=right],[data-phase=prompt],[data-phase=ready])) #site-brand,
body:has(#traveler-view[hidden]) #site-brand{opacity:1;visibility:visible;pointer-events:auto}

/* The classic welcome follows the name; neither lockup changes its geometry. */
#site-brand .ding-brand-tagline{
 position:absolute;top:calc(100% + 2px);left:50%;display:block;
 width:max-content;max-width:none;transform:translateX(-50%);
 margin:0;color:#6b503d;font:400 14px/1.2 var(--serif);
 letter-spacing:.01em;white-space:nowrap;pointer-events:none;
}
#site-brand .ding-brand-tagline em{color:inherit;font-weight:inherit}
body:has(#arrival-stage.motion-paused) #site-brand .ding-brand-tagline{animation-play-state:paused}

@media(max-width:999px){
 /* Reserve the line within the existing mobile header, including short screens. */
 html[data-ding-mobile-view] #site-brand{padding-bottom:19px}
 body:has(#traveler-view:not([hidden]) #arrival-stage:is([data-phase=brand],[data-phase=backdrop])) #site-brand .ding-brand-tagline{
  animation:ding-welcome-appear .55s .7s ease both;
 }
}

@media(min-width:1000px){
 #site-brand{top:0;filter:none;translate:0 0}
 #site-brand .ding-brand-lockup{width:220px;opacity:0;visibility:hidden;transition:none}
 /* Exact letter bounds in the 540×145 SVG: x173.999–523.001, bottom y106.841.
    Center the welcome under DING itself, clear of the glass mark to its left. */
 #site-brand .ding-brand-lockup>.ding-brand-tagline{
  left:64.53697%;top:calc(73.68369% + 6px);
  font-size:18px;line-height:1.25;font-weight:500;text-align:center;
 }
 body:has(#traveler-view:not([hidden]) #arrival-stage:is([data-phase=left],[data-phase=right],[data-phase=prompt],[data-phase=ready])) #site-brand .ding-brand-lockup,
 body:has(#traveler-view[hidden]) #site-brand .ding-brand-lockup{opacity:1;visibility:visible;transition:opacity .45s ease}
 #site-brand .ding-brand-ray{animation:none!important}
 #site-brand .ding-brand-presentation{
  position:absolute;left:50%;top:clamp(50px,8svh,88px);display:block;
  width:clamp(360px,34vw,440px);aspect-ratio:900/730;
  transform:translateX(-50%);transform-origin:50% 0;
  opacity:0;visibility:hidden;translate:0 -24px;scale:.84;pointer-events:none;
  transition:opacity .35s ease,translate .55s var(--stage-ease),scale .55s var(--stage-ease),visibility 0s .55s;
 }
 /* The same source letters map to x57.032–855.718 in the 900×730 presentation. */
 #site-brand .ding-brand-presentation>.ding-brand-tagline{left:50.70832%;top:calc(100% + 10px);font-size:clamp(24px,2.2vw,28px);text-align:center}
 body:has(#traveler-view:not([hidden]) #arrival-stage:is([data-phase=brand],[data-phase=backdrop])) #site-brand .ding-brand-presentation>.ding-brand-tagline{
  animation:ding-welcome-appear .55s .7s ease both;
 }
 .ding-presentation-logo{display:block;width:100%;height:auto;overflow:visible;stroke:none}

 /* Keep the large signature visible across the background beat, without restarting it. */
 body:has(#traveler-view:not([hidden]) #arrival-stage:is([data-phase=brand],[data-phase=backdrop])) #site-brand{
  opacity:1;visibility:visible;filter:none;translate:0 0;transition:none;
 }
 body:has(#traveler-view:not([hidden]) #arrival-stage:is([data-phase=brand],[data-phase=backdrop])) #site-brand .ding-brand-lockup{opacity:0;visibility:hidden;transition:none}
 body:has(#traveler-view:not([hidden]) #arrival-stage:is([data-phase=brand],[data-phase=backdrop])) #site-brand .ding-brand-presentation{
  opacity:1;visibility:visible;translate:0 0;scale:1;transition:none;
 }
 body:has(#traveler-view:not([hidden]) #arrival-stage:is([data-phase=brand],[data-phase=backdrop])) .ding-presentation-glass{
  animation:ding-signature-appear .6s var(--stage-ease) both;
 }
 body:has(#traveler-view:not([hidden]) #arrival-stage:is([data-phase=brand],[data-phase=backdrop])) .ding-presentation-name{
  animation:ding-signature-appear .55s .3s var(--stage-ease) both;
 }
 body:has(#traveler-view:not([hidden]) #arrival-stage:is([data-phase=brand],[data-phase=backdrop])) :is(.ding-presentation-signature,.ding-presentation-rules){
  animation:ding-signature-appear .45s .6s ease both;
 }
 body:has(#traveler-view:not([hidden]) #arrival-stage:is([data-phase=brand],[data-phase=backdrop])) .ding-presentation-ray{
  animation:ding-signature-ray .58s var(--ray-delay,.72s) ease both;
 }
 .ding-presentation-ray.presentation-ray-2{--ray-delay:.8s}
 .ding-presentation-ray.presentation-ray-3{--ray-delay:.88s}

 /* The settled header answers René's final entrance with one brief signature. */
 body:has(#traveler-view:not([hidden]) #arrival-stage[data-intro-spark=true]) #site-brand .ding-brand-ray{
  animation:ding-signature-ready .58s ease-out!important;
 }

 body:has(#arrival-stage.motion-paused) #site-brand :is(.ding-brand-presentation *,.ding-brand-tagline){animation-play-state:paused}
 body:has(#arrival-stage.motion-paused) #site-brand :is(.ding-brand-presentation,.ding-brand-lockup){transition:none}

 @media(max-height:680px){
  #site-brand .ding-brand-presentation{top:42px;width:360px}
 }
 @media(max-height:520px){
  #site-brand .ding-brand-presentation{top:30px;width:310px}
 }
}

@keyframes ding-welcome-appear{
 from{opacity:0;translate:0 3px}
 to{opacity:1;translate:0 0}
}
@keyframes ding-signature-appear{
 from{opacity:0;translate:0 4px}
 to{opacity:1;translate:0 0}
}
@keyframes ding-signature-ray{
 0%{opacity:0}
 45%{opacity:1}
 70%{opacity:.65}
 100%{opacity:1}
}
@keyframes ding-signature-ready{
 0%{opacity:.55}
 38%{opacity:1}
 100%{opacity:1}
}

@media(prefers-reduced-motion:reduce){
 #site-brand .ding-brand-presentation,#site-brand .ding-brand-presentation *,#site-brand .ding-brand-lockup,#site-brand .ding-brand-tagline{animation:none!important;transition:none!important}
}
