/* The mark is the original rounded 2×2 cube, rebuilt in orthographic 3D. */
@property --cube-depth-current {
  syntax: "<number>";
  inherits: true;
  initial-value: .66;
}
.brand-cube {
  --brand-cube-unit: 26px;
  --brand-cube-half: 13px;
  --brand-cube-gap: 2px;
  --brand-cube-radius: 5.5px;
  display: block;
  position: relative;
  width: 128px;
  height: 128px;
  flex: none;
  pointer-events: none;
  /* Knock out the black body after 3D occlusion. The gaps and silhouette
     expose the actual glass beneath, while gray tiles become white alpha. */
  filter: url(#brand-cube-material);
}
.brand-cube.travos-icon {
  --brand-cube-unit: 6px;
  --brand-cube-half: 3px;
  --brand-cube-gap: .45px;
  --brand-cube-radius: 1.25px;
  width: 20px;
  height: 20px;
}
/* Native startup reveals only complete, initialized geometry. The fallback
   remains visible when enhancement is unsupported or reduced motion is set. */
html[data-cube-engine="native"] .intro-mark .brand-cube:not([data-dynamic="true"]) {
  visibility: hidden;
}
.brand-cube-material-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
.brand-cube-view,
.brand-cube-cubie,
.brand-cube-piece {
  position: absolute;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.brand-cube-view {
  left: 50%;
  top: 50%;
  /* Equal projected axes reproduce the logo's three diamond-shaped faces. */
  transform: rotateX(-35.2643897deg) rotateY(-45deg);
}
.brand-cube-piece {
  transform: translate3d(
    calc(var(--cube-x) * var(--brand-cube-half)),
    calc(var(--cube-y) * var(--brand-cube-half)),
    calc(var(--cube-z) * var(--brand-cube-half))
  );
}
.brand-cube-cubie {
  /* The source fades pieces by camera depth: near 1, adjacent .66, far .30.
     Recompute that depth at each quarter-turn, then blend on the tile only.
     Opacity on a preserve-3d group would flatten the cube. */
  --cube-depth-rest: clamp(0, calc(.48 + .18 * (var(--cube-x) - var(--cube-y) + var(--cube-z))), 1);
  --cube-depth-top: clamp(0, calc(.48 + .18 * (var(--cube-z) - var(--cube-y) - var(--cube-x))), 1);
  --cube-depth-right: clamp(0, calc(.48 + .18 * (var(--cube-x) - var(--cube-z) - var(--cube-y))), 1);
}
.brand-cube-face {
  position: absolute;
  left: calc(-1 * var(--brand-cube-half));
  top: calc(-1 * var(--brand-cube-half));
  width: var(--brand-cube-unit);
  height: var(--brand-cube-unit);
  /* Round the occluding body too, so it cannot square off another tile's
     softened corner during a turn. Keep rounding on these leaf faces only. */
  border-radius: calc(var(--brand-cube-radius) + var(--brand-cube-gap));
  background: #000;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.brand-cube-face.is-tile::after {
  content: "";
  position: absolute;
  inset: var(--brand-cube-gap);
  border-radius: var(--brand-cube-radius);
  background: #fff;
  opacity: var(--cube-depth-rest);
}
.brand-cube-face--front { transform: translateZ(var(--brand-cube-half)); }
.brand-cube-face--back { transform: rotateY(180deg) translateZ(var(--brand-cube-half)); }
.brand-cube-face--left { transform: rotateY(-90deg) translateZ(var(--brand-cube-half)); }
.brand-cube-face--right { transform: rotateY(90deg) translateZ(var(--brand-cube-half)); }
.brand-cube-face--top { transform: rotateX(90deg) translateZ(var(--brand-cube-half)); }
.brand-cube-face--bottom { transform: rotateX(-90deg) translateZ(var(--brand-cube-half)); }

/* Orbit each whole cubie around the cube's center. The overlapping corner
   follows both turns, after the top layer has returned to its solved pose. */
.brand-cube-cubie:is(.is-top, .is-right),
.brand-cube-cubie:is(.is-top, .is-right) .brand-cube-face.is-tile::after {
  animation-duration: var(--brand-cube-duration, 9600ms);
  animation-delay: var(--brand-cube-delay, 0ms);
  animation-timing-function: cubic-bezier(.45, 0, .2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}
.brand-cube-cubie.is-top { animation-name: brand-cube-top; }
.brand-cube-cubie.is-right { animation-name: brand-cube-right; }
.brand-cube-cubie.is-top.is-right { animation-name: brand-cube-corner; }
.brand-cube-cubie.is-top .brand-cube-face.is-tile::after { animation-name: brand-cube-depth-top; }
.brand-cube-cubie.is-right .brand-cube-face.is-tile::after { animation-name: brand-cube-depth-right; }
.brand-cube-cubie.is-top.is-right .brand-cube-face.is-tile::after { animation-name: brand-cube-depth-corner; }
@keyframes brand-cube-top {
  0%, 8%, 45%, 100% { transform: rotateY(0deg); }
  22%, 31% { transform: rotateY(90deg); }
}
@keyframes brand-cube-right {
  0%, 54%, 91%, 100% { transform: rotateX(0deg); }
  68%, 77% { transform: rotateX(-90deg); }
}
@keyframes brand-cube-corner {
  0%, 8%, 45%, 54%, 91%, 100% { transform: rotateY(0deg) rotateX(0deg); }
  22%, 31% { transform: rotateY(90deg) rotateX(0deg); }
  68%, 77% { transform: rotateY(0deg) rotateX(-90deg); }
}
@keyframes brand-cube-depth-top {
  0%, 8%, 45%, 100% { opacity: var(--cube-depth-rest); }
  22%, 31% { opacity: var(--cube-depth-top); }
}
@keyframes brand-cube-depth-right {
  0%, 54%, 91%, 100% { opacity: var(--cube-depth-rest); }
  68%, 77% { opacity: var(--cube-depth-right); }
}
@keyframes brand-cube-depth-corner {
  0%, 8%, 45%, 54%, 91%, 100% { opacity: var(--cube-depth-rest); }
  22%, 31% { opacity: var(--cube-depth-top); }
  68%, 77% { opacity: var(--cube-depth-right); }
}

/* The procedural motion owner supplies physical transforms and camera depth.
   Keep opacity on leaf tiles so rotating groups retain their 3D hierarchy. */
.brand-cube[data-dynamic="true"] .brand-cube-cubie,
.brand-cube[data-dynamic="true"] .brand-cube-cubie .brand-cube-face.is-tile::after {
  animation: none;
}
.brand-cube[data-dynamic="true"] .brand-cube-cubie .brand-cube-face.is-tile::after {
  opacity: var(--cube-depth-current);
}
@media (prefers-reduced-motion: reduce) {
  .brand-cube-cubie:is(.is-top, .is-right),
  .brand-cube-cubie:is(.is-top, .is-right) .brand-cube-face.is-tile::after { animation: none; }
  .brand-cube[data-dynamic="true"] .brand-cube-view {
    transform: rotateX(-35.2643897deg) rotateY(-45deg) !important;
  }
  .brand-cube[data-dynamic="true"] .brand-cube-cubie { transform: none !important; }
  .brand-cube[data-dynamic="true"] .brand-cube-cubie .brand-cube-face.is-tile::after {
    opacity: var(--cube-depth-rest) !important;
  }
}
