.header .wordmark[data-brand-logo] {
  --ws-logo-trail: #62c4ee;
  --ws-logo-edge: #e6faff;
  --ws-logo-sweep: #e6fbff;
  --ws-logo-halo: rgb(105 213 255 / 64%);
  --ws-logo-stroke: 7;
  --ws-logo-idle-opacity: 1;
  --ws-logo-entry-time: 350ms;
  --ws-logo-mark-time: 195ms;
  --ws-logo-mark-delay: 155ms;
  --ws-logo-light-delay: 305ms;
}

[data-match-family="home"] .header .wordmark[data-brand-logo] {
  --ws-logo-entry-time: 600ms;
  --ws-logo-mark-time: 330ms;
  --ws-logo-mark-delay: 280ms;
  --ws-logo-light-delay: 540ms;
}

.header.scrolled .wordmark[data-brand-logo] {
  --ws-logo-idle-opacity: .48;
}

[data-theme="light"] .header .wordmark[data-brand-logo] {
  --ws-logo-trail: #258cb2;
  --ws-logo-edge: #155cc5;
  --ws-logo-sweep: #0b66c4;
  --ws-logo-halo: rgb(32 137 191 / 40%);
}

@media (max-width: 640px) {
  .header .wordmark[data-brand-logo] {
    --ws-logo-stroke: 9.5;
  }
}

.header .wordmark[data-brand-logo] > .ws-logo > :is(.ws-infinity-trace, .ws-infinity-sweep) {
  display: none;
  animation: none !important;
  opacity: 0 !important;
}

@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="paused"]) .header .wordmark[data-brand-logo] > .ws-logo {
    animation: ws-wordmark-open var(--ws-logo-entry-time) cubic-bezier(.22, 1, .36, 1) both;
  }

  :root:not([data-motion="paused"]) .header .wordmark[data-brand-logo] > .ws-logo > .ws-infinity {
    animation: ws-wordmark-mark var(--ws-logo-mark-time) ease-out var(--ws-logo-mark-delay) both !important;
  }

  :root:not([data-motion="paused"]) .header .wordmark[data-brand-logo] > .ws-logo > :is(.ws-infinity-trace, .ws-infinity-sweep) {
    display: inline;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-opacity: 0;
    opacity: 1 !important;
    pointer-events: none;
  }

  :root:not([data-motion="paused"]) .header .wordmark[data-brand-logo] > .ws-logo > .ws-infinity-trace {
    opacity: var(--ws-logo-idle-opacity) !important;
    transition: opacity 260ms ease-out;
    animation: ws-wordmark-light-in 340ms ease-out var(--ws-logo-light-delay) both !important;
  }

  :root:not([data-motion="paused"]) .header .wordmark[data-brand-logo] .ws-infinity-trace > use {
    animation: ws-wordmark-trace 4.8s linear var(--ws-logo-light-delay) infinite both;
  }

  .header .wordmark[data-brand-logo] .ws-logo-trail {
    color: var(--ws-logo-trail);
    stroke-width: calc(var(--ws-logo-stroke) + 1.5);
    stroke-dasharray: 160 840;
    opacity: .57;
    filter: drop-shadow(0 0 6px var(--ws-logo-halo));
  }

  .header .wordmark[data-brand-logo] .ws-logo-edge {
    --ws-logo-offset: 109px;
    color: var(--ws-logo-edge);
    stroke-width: calc(var(--ws-logo-stroke) - 1);
    stroke-dasharray: 50 950;
  }

  :root:not([data-motion="paused"]) .header .wordmark[data-brand-logo] > .ws-logo > .ws-infinity-sweep {
    color: var(--ws-logo-sweep);
    stroke-width: calc(var(--ws-logo-stroke) + 2);
    stroke-dasharray: 158 842;
    filter: drop-shadow(0 0 7px var(--ws-logo-halo));
  }

  :root:not([data-motion="paused"]) .header .wordmark[data-brand-logo]:is(:hover, :focus-visible) > .ws-logo > .ws-infinity-sweep {
    animation: ws-wordmark-sweep 960ms ease-in-out both !important;
  }
}

@keyframes ws-wordmark-open {
  from {
    clip-path: inset(-6px 88% -6px -6px);
    opacity: .4;
    transform: translateY(3px);
  }

  to {
    clip-path: inset(-6px -6px);
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ws-wordmark-mark {
  from { opacity: .24; }
  to { opacity: 1; }
}

/* The shorter reflection rides at the front of the trail on the closed path. */
@keyframes ws-wordmark-trace {
  from { stroke-dashoffset: calc(500px - var(--ws-logo-offset, 0px)); }
  to { stroke-dashoffset: calc(-500px - var(--ws-logo-offset, 0px)); }
}

@keyframes ws-wordmark-light-in {
  from { stroke-opacity: 0; }
  to { stroke-opacity: .93; }
}

@keyframes ws-wordmark-sweep {
  0% { stroke-dashoffset: 500; stroke-opacity: 0; }
  20% { stroke-opacity: 1; }
  64% { stroke-opacity: .92; }
  100% { stroke-dashoffset: -500; stroke-opacity: 0; }
}
