/* 3 Traits of Beauty: 3D emblem hero component.
   The host keeps the exact footprint of the current .home-brand-ring (390px desktop, min(65vw, 300px)
   at 900px and below), so swapping it in causes no layout shift. The stage overhangs the host by 16%
   on every side to leave room for perspective, highlights and the soft shadow; it never takes layout. */
.tob-emblem {
  position: relative;
  width: min(100%, 390px);
  aspect-ratio: 1 / 1;
  isolation: isolate;
}
.tob-emblem__stage {
  position: absolute;
  inset: -16%;
  pointer-events: none;
}
.tob-emblem__poster,
.tob-emblem__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.tob-emblem__poster {
  max-width: none;
  object-fit: contain;
}
.tob-emblem__canvas {
  opacity: 0;
  transition: opacity 0.45s ease;
}
.tob-emblem[data-emblem-ready="true"] .tob-emblem__canvas {
  opacity: 1;
}
.tob-emblem[data-emblem-ready="true"] .tob-emblem__poster {
  opacity: 0;
  transition: opacity 0.45s ease 0.12s;
}
/* Cinematic entrance: the live emblem rises out of darkness, so the poster clears quickly. */
.tob-emblem[data-emblem-entrance="cinematic"] .tob-emblem__canvas {
  transition-duration: 1.1s;
}
.tob-emblem[data-emblem-entrance="cinematic"][data-emblem-ready="true"] .tob-emblem__poster {
  transition: opacity 0.3s ease;
}

/* Motion control (WCAG 2.2.2). Sits in the corner outside the circular silhouette. */
.tob-emblem__toggle {
  position: absolute;
  right: -5%;
  bottom: -5%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #e8bd76;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tob-emblem__toggle::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid #b58d52;
  border-radius: 50%;
  background: rgba(8, 12, 12, 0.72);
  transition: border-color 0.2s, background-color 0.2s;
}
.tob-emblem__toggle:hover::before {
  border-color: #e8bd76;
  background: rgba(8, 12, 12, 0.9);
}
.tob-emblem__toggle:focus-visible {
  outline: 3px solid #72d5df;
  outline-offset: 2px;
}
.tob-emblem__toggle svg {
  position: relative;
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.tob-emblem__toggle .tob-emblem__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .tob-emblem {
    width: min(65vw, 300px);
  }
  .tob-emblem__toggle {
    right: -11%;
    bottom: -9%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tob-emblem__canvas,
  .tob-emblem__poster {
    transition: none !important;
  }
  .tob-emblem__toggle {
    display: none;
  }
}
