/* DIMART shared UI components
   Source of truth for desktop mega-menu indicators and the About brand sculpture. */

/* Mega-menu indicator ------------------------------------------------------ */
.site-header .nav-item.has-mega > a {
  padding-left: 30px !important;
}

.site-header .nav-item.has-mega > a::before,
.site-header .nav-item.has-mega > a::after {
  content: "";
  display: block;
  position: absolute;
  right: auto;
  bottom: auto;
  transition:
    transform 280ms cubic-bezier(.2, .8, .2, 1),
    top 280ms cubic-bezier(.2, .8, .2, 1),
    background-color 280ms ease,
    border-color 280ms ease,
    box-shadow 280ms ease;
}

.site-header .nav-item.has-mega > a::before {
  width: 22px;
  height: 22px;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(115, 221, 255, .2);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(102, 224, 255, .16), rgba(255, 255, 255, .04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  opacity: 1;
}

.site-header .nav-item.has-mega > a::after {
  width: 6px;
  height: 6px;
  left: 8px;
  top: calc(50% - 5px);
  border-right: 1.7px solid #a6edff;
  border-bottom: 1.7px solid #a6edff;
  background: none;
  transform: rotate(45deg);
}

.site-header .nav-item.has-mega:is(:hover, :focus-within, .is-mega-open) > a::before {
  transform: translateY(-50%) scale(1.08);
  border-color: rgba(135, 231, 255, .34);
  background: linear-gradient(145deg, rgba(100, 228, 255, .28), rgba(255, 255, 255, .08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 0 22px rgba(76, 216, 255, .19);
}

.site-header .nav-item.has-mega:is(:hover, :focus-within, .is-mega-open) > a::after {
  top: calc(50% - 1px);
  transform: rotate(225deg);
}

.site-header .nav-item.has-mega > a:focus-visible {
  outline: 2px solid rgba(159, 232, 255, .92);
  outline-offset: 5px;
}

/* Mobile navigation control ---------------------------------------------- */
@media (max-width: 1000px) {
  .site-header .menu-toggle {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
    transition: transform 280ms ease, background-color 280ms ease;
  }

  .site-header .menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transform-origin: center;
    transition: transform 280ms ease, opacity 220ms ease;
  }

  .site-header .menu-toggle span:nth-child(2) { width: 14px; }
  .site-header .menu-toggle.open { background: #fff; transform: rotate(90deg); }
  .site-header .menu-toggle.open span { background: #042872; }
  .site-header .menu-toggle.open span:first-child { transform: translateY(7px) rotate(45deg); }
  .site-header .menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .site-header .menu-toggle.open span:last-child { transform: translateY(-7px) rotate(-45deg); }
  .site-header .menu-toggle:focus-visible { outline: 2px solid #9fe8ff; outline-offset: 3px; }
}

/* About brand sculpture --------------------------------------------------- */
.logo-power-core {
  width: min(390px, 34vw);
  height: min(500px, 42vw);
  overflow: visible;
  border-radius: 0;
  background: none;
  box-shadow: none;
  animation: none;
}

.logo-power-core::before,
.logo-power-core::after {
  content: none;
}

.brand-sculpture-stage {
  perspective: 1500px;
  transform-style: preserve-3d;
}

.brand-sculpture {
  --brand-tilt-x: 4deg;
  --brand-tilt-y: -11deg;
  position: absolute;
  inset: -48px;
  z-index: 7;
  display: grid;
  place-items: center;
  margin: 0;
  isolation: isolate;
  transform-style: preserve-3d;
  animation: brandSculptureFloat 8.5s ease-in-out infinite;
}

.brand-sculpture__object {
  position: relative;
  width: min(390px, 34vw);
  aspect-ratio: 4009 / 5084;
  transform-style: preserve-3d;
  transform: rotateX(var(--brand-tilt-x)) rotateY(var(--brand-tilt-y));
  transition: transform 360ms cubic-bezier(.2, .8, .2, 1);
  filter: drop-shadow(0 46px 58px rgba(0, 9, 36, .48));
}

.brand-sculpture__face,
.brand-sculpture__extrusion,
.brand-sculpture__rim,
.brand-sculpture__specular {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.brand-sculpture__face {
  z-index: 4;
  display: block;
  object-fit: contain;
  transform: translateZ(38px);
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 0 22px rgba(198, 247, 255, .18));
}

.brand-sculpture__extrusion,
.brand-sculpture__rim,
.brand-sculpture__specular {
  -webkit-mask: url("LOGO%20Type%20white%202.png") center / contain no-repeat;
  mask: url("LOGO%20Type%20white%202.png") center / contain no-repeat;
  pointer-events: none;
}

.brand-sculpture__extrusion {
  z-index: 1;
  background: linear-gradient(145deg, #57e4ff 0%, #0a77cf 34%, #07346f 70%, #020d2f 100%);
  transform: translate3d(-17px, 23px, -42px);
  filter:
    drop-shadow(-1px 1px 0 #0b8eda)
    drop-shadow(-1px 1px 0 #0a7bc7)
    drop-shadow(-1px 1px 0 #096bb2)
    drop-shadow(-1px 1px 0 #085b9d)
    drop-shadow(-1px 1px 0 #074b88)
    drop-shadow(-1px 1px 0 #063d75)
    drop-shadow(-1px 1px 0 #052f62)
    drop-shadow(-1px 1px 0 #042550)
    drop-shadow(-1px 1px 0 #031b42)
    drop-shadow(-1px 1px 0 #021436);
}

.brand-sculpture__rim {
  z-index: 3;
  background: linear-gradient(125deg, #ddfbff 4%, #4ee0ff 34%, #196ec4 66%, #071c52 96%);
  transform: translate3d(-5px, 7px, 18px);
  filter: drop-shadow(0 0 16px rgba(86, 224, 255, .55));
}

.brand-sculpture__specular {
  z-index: 5;
  width: 42%;
  left: -55%;
  right: auto;
  background: linear-gradient(100deg, transparent 15%, rgba(255, 255, 255, .06) 34%, rgba(255, 255, 255, .78) 50%, rgba(112, 230, 255, .10) 66%, transparent 82%);
  transform: translateZ(42px) skewX(-10deg);
  mix-blend-mode: screen;
  opacity: .48;
  animation: brandSpecularSweep 6.8s ease-in-out infinite;
}

.brand-sculpture__aura {
  position: absolute;
  width: 470px;
  max-width: 84vw;
  aspect-ratio: 1;
  z-index: -2;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 226, 255, .27), rgba(72, 91, 255, .12) 42%, transparent 70%);
  filter: blur(15px);
  animation: brandAura 5.8s ease-in-out infinite;
}

.brand-sculpture__orbit {
  position: absolute;
  width: 490px;
  max-width: 90vw;
  height: 230px;
  z-index: 8;
  border: 1px solid rgba(121, 229, 255, .3);
  border-radius: 50%;
  transform: rotateX(69deg) rotateZ(-8deg);
  animation: brandOrbit 14s linear infinite;
}

.brand-sculpture__orbit--secondary {
  width: 330px;
  height: 330px;
  z-index: 2;
  opacity: .52;
  transform: rotateX(82deg) rotateZ(16deg);
  animation-duration: 19s;
  animation-direction: reverse;
}

.brand-sculpture__orbit i {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #effeff;
  box-shadow: 0 0 24px #62e0ff, 0 0 46px rgba(83, 207, 255, .68);
}

.brand-sculpture__orbit--secondary i {
  top: auto;
  right: 62px;
  bottom: 12px;
  left: auto;
  width: 9px;
  height: 9px;
}

.brand-sculpture__node {
  position: absolute;
  z-index: 9;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dffcff;
  box-shadow: 0 0 16px #58ddff;
  animation: brandNodePulse 3.6s ease-in-out infinite;
}

.brand-sculpture__node--one { top: 27%; left: 13%; }
.brand-sculpture__node--two { right: 9%; bottom: 27%; animation-delay: -1.4s; }
.brand-sculpture__node--three { bottom: 15%; left: 29%; animation-delay: -2.5s; }

.v20-about-signal {
  position: absolute;
  z-index: 10;
  min-width: 128px;
  padding: 11px 13px;
  border: 1px solid rgba(119, 219, 255, .16);
  border-radius: 17px;
  background: rgba(2, 27, 69, .66);
  color: #fff;
  backdrop-filter: blur(14px);
  animation: brandSignalFloat 5.4s ease-in-out infinite;
}

.v20-about-signal small {
  display: block;
  color: #7be2ff;
  font: 700 6px Arial, sans-serif;
  letter-spacing: .13em;
}

.v20-about-signal b { display: block; margin-top: 4px; font-size: 11px; }
.v20-about-signal.a { top: 31%; left: 2%; }
.v20-about-signal.b { top: 29%; right: 3%; animation-delay: -1.6s; }
.v20-about-signal.c { right: 10%; bottom: 16%; animation-delay: -3s; }

@keyframes brandSculptureFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes brandSpecularSweep {
  0%, 18% { transform: translate3d(-35%, 0, 42px) skewX(-10deg); opacity: 0; }
  42%, 58% { opacity: .48; }
  82%, 100% { transform: translate3d(420%, 0, 42px) skewX(-10deg); opacity: 0; }
}

@keyframes brandAura { 50% { transform: scale(1.08); opacity: .76; } }
@keyframes brandOrbit { to { transform: rotateX(69deg) rotateZ(352deg); } }
@keyframes brandNodePulse { 50% { transform: scale(.62); opacity: .46; } }
@keyframes brandSignalFloat { 50% { transform: translateY(-8px); } }

@media (max-width: 1000px) {
  .logo-power-core { width: min(320px, 58vw); height: min(410px, 72vw); }
  .brand-sculpture { inset: -28px; }
  .brand-sculpture__object { width: min(315px, 56vw); }
  .brand-sculpture__orbit { width: 390px; height: 184px; }
  .brand-sculpture__orbit--secondary { width: 260px; height: 260px; }
}

@media (max-width: 700px) {
  .site-header .nav,
  .site-header.scrolled .nav {
    width: calc(100% - 104px);
    margin-right: 10px;
    margin-left: 94px;
  }

  body.v8-ui-preview .site-header .nav-actions .btn.primary {
    display: none !important;
  }

  .logo-power-core { width: min(258px, 69vw); height: min(330px, 88vw); }
  .brand-sculpture { inset: -14px; }
  .brand-sculpture__object { width: min(252px, 66vw); filter: drop-shadow(0 30px 38px rgba(0, 9, 36, .42)); }
  .brand-sculpture__extrusion {
    transform: translate3d(-11px, 15px, -28px);
    filter:
      drop-shadow(-1px 1px 0 #0b8eda)
      drop-shadow(-1px 1px 0 #0a77c2)
      drop-shadow(-1px 1px 0 #085d9e)
      drop-shadow(-1px 1px 0 #06467f)
      drop-shadow(-1px 1px 0 #043261)
      drop-shadow(-1px 1px 0 #022149);
  }
  .brand-sculpture__orbit { width: 305px; height: 142px; }
  .brand-sculpture__orbit--secondary { width: 205px; height: 205px; }
  .brand-sculpture__specular { display: none; }
  .v20-about-signal { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-sculpture,
  .brand-sculpture__specular,
  .brand-sculpture__aura,
  .brand-sculpture__orbit,
  .brand-sculpture__node,
  .v20-about-signal {
    animation: none;
  }

  .brand-sculpture__object { transition: none; }
}
