/* SUPBRO 2026-07-20: welcome voice control and unobstructed FLEX commerce cards. */

.welcome-voice-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 18px auto;
  grid-template-areas:
    "icon label"
    "icon status";
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(235, 218, 255, 0.2);
  border-radius: 999px;
  padding: 7px 13px 7px 11px;
  background: rgba(19, 8, 32, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: rgba(249, 247, 255, 0.94);
  font: inherit;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.welcome-voice-toggle:hover,
.welcome-voice-toggle:focus-visible,
.welcome-voice-toggle[data-voice-state="playing"] {
  border-color: rgba(244, 255, 47, 0.76);
  background: rgba(42, 17, 67, 0.92);
  color: var(--accent);
  outline: none;
}

.welcome-voice-toggle:hover {
  transform: translateY(-1px);
}

.welcome-voice-toggle[aria-pressed="true"] {
  color: rgba(222, 214, 231, 0.62);
}

.welcome-voice-icon {
  grid-area: icon;
  position: relative;
  width: 15px;
  height: 15px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.welcome-voice-icon::before,
.welcome-voice-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid currentColor;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.welcome-voice-icon::before {
  width: 21px;
  height: 21px;
}

.welcome-voice-icon::after {
  width: 27px;
  height: 27px;
  opacity: 0;
}

.welcome-voice-toggle[data-voice-state="playing"] .welcome-voice-icon::before {
  animation: supbroVoicePulse 1.25s ease-out infinite;
}

.welcome-voice-toggle[data-voice-state="playing"] .welcome-voice-icon::after {
  animation: supbroVoicePulse 1.25s 0.22s ease-out infinite;
}

.welcome-voice-label {
  grid-area: label;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.03em;
}

.welcome-voice-toggle small {
  grid-area: status;
  color: rgba(224, 216, 235, 0.62);
  font-size: 8px;
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: 0.03em;
}

@keyframes supbroVoicePulse {
  0% {
    opacity: 0.78;
    transform: translate(-50%, -50%) scale(0.76);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

.flex-gallery-shell .flex-gallery figure,
.flex-gallery-shell .flex-gallery figure:nth-child(n + 5) {
  display: grid !important;
  grid-template-rows: auto minmax(98px, auto);
  align-content: start;
  aspect-ratio: auto !important;
  min-height: 0 !important;
}

.flex-gallery-shell .flex-gallery figure::after {
  display: none !important;
}

.flex-gallery-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0d0716;
}

.flex-gallery-shell .flex-gallery .flex-gallery-media > img {
  position: absolute !important;
  inset: 0 !important;
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: 50% 56%;
}

.flex-gallery-shell .flex-gallery figure:hover .flex-gallery-media > img,
.flex-gallery-shell .flex-gallery figure:focus-within .flex-gallery-media > img {
  filter: saturate(1.06) brightness(1.04);
  transform: scale(1.012);
}

.flex-gallery-open {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2;
}

.flex-gallery-commerce {
  position: relative !important;
  inset: auto !important;
  z-index: 10;
  display: block;
  min-width: 0;
  border-top: 1px solid rgba(236, 217, 255, 0.2);
  background: linear-gradient(145deg, rgba(20, 8, 34, 0.98), rgba(42, 16, 68, 0.96));
  pointer-events: auto;
}

.flex-gallery-actions {
  position: relative !important;
  inset: auto !important;
  z-index: auto;
  min-height: 98px;
  gap: 8px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 11px 12px 12px;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: auto;
  backdrop-filter: none !important;
  transform: none !important;
}

.flex-gallery figure:hover .flex-gallery-actions,
.flex-gallery figure:focus-within .flex-gallery-actions {
  border-color: transparent;
  transform: none !important;
}

html[dir="rtl"] .flex-gallery-color-select {
  grid-template-columns: minmax(0, 1fr) auto;
}

html[dir="rtl"] .flex-gallery-color-select > span {
  grid-column: 2;
}

html[dir="rtl"] .flex-gallery-color-select select {
  grid-column: 1;
}

@media (max-width: 1180px) {
  .welcome-voice-toggle small {
    display: none;
  }

  .welcome-voice-toggle {
    grid-template-areas: "icon label";
  }
}

@media (max-width: 860px) {
  .welcome-voice-toggle {
    grid-template-columns: 18px;
    grid-template-areas: "icon";
    width: 42px;
    min-width: 42px;
    padding: 8px;
    place-content: center;
  }

  .welcome-voice-label,
  .welcome-voice-toggle small {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  .flex-gallery-shell .flex-gallery figure,
  .flex-gallery-shell .flex-gallery figure:nth-child(n + 5) {
    grid-template-rows: auto minmax(112px, auto);
  }

  .flex-gallery-actions {
    min-height: 112px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-voice-toggle,
  .welcome-voice-icon::before,
  .welcome-voice-icon::after {
    animation: none !important;
    transition: none !important;
  }
}

/* 2026-07-20 final seven-language RTL completion. */
html[dir="rtl"] :is(
  .flex-system,
  .services,
  .products,
  .ai-scan,
  .origin,
  .proof,
  .culture-wall,
  .contact
) > .section-copy {
  padding: 8px clamp(22px, 2.2vw, 34px) 8px 0 !important;
  border-right: 1px solid rgba(246, 230, 255, 0.2);
  border-left: 0 !important;
  text-align: right !important;
}

html[dir="rtl"] :is(
  .flex-system,
  .services,
  .products,
  .ai-scan,
  .origin,
  .proof,
  .culture-wall,
  .contact
) > .section-copy::before {
  right: -1px;
  left: auto;
}

html[dir="rtl"] :is(
  .flex-system,
  .services,
  .products,
  .ai-scan,
  .origin,
  .proof,
  .culture-wall,
  .contact
) > .section-copy > :is(.eyebrow, h2, p),
html[dir="rtl"] .section-panel > .section-copy > p:not(.eyebrow),
html[dir="rtl"] .contact > .section-copy > p:not(.eyebrow) {
  text-align: right !important;
}

html[dir="rtl"] .mini-program-card,
html[dir="rtl"] .mini-program-card .mini-program-placeholder-title,
html[dir="rtl"] .mini-program-card > small {
  text-align: right !important;
}

html[dir="rtl"] .mini-program-card > :is(span, em) {
  align-self: flex-end;
}

.flex-gallery-shell .flex-gallery {
  direction: ltr !important;
}

html[dir="rtl"] .flex-gallery-head,
html[dir="rtl"] .flex-gallery-shell .flex-gallery figure,
html[dir="rtl"] .flex-gallery-commerce,
html[dir="rtl"] .flex-gallery-actions {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .flex-gallery-action-buttons {
  direction: rtl;
}

@media (max-width: 860px) {
  html[dir="rtl"] :is(
    .flex-system,
    .services,
    .products,
    .ai-scan,
    .origin,
    .proof,
    .culture-wall,
    .contact
  ) > .section-copy {
    padding: 4px 18px 2px 0 !important;
  }
}

/* 2026-07-20: livelier SUPBRO FLEX motion with a lightweight LED edge runner. */
@keyframes supbroFlexCardFloat {
  0%,
  100% {
    --float-x: -1px;
    --float-y: 1px;
  }

  22% {
    --float-x: 1.5px;
    --float-y: -4px;
  }

  48% {
    --float-x: -1.5px;
    --float-y: -7px;
  }

  72% {
    --float-x: 2px;
    --float-y: -2px;
  }

  88% {
    --float-x: 0;
    --float-y: -5px;
  }
}

body .section-panel .flex-gallery figure.has-edge-glow.is-motion-visible {
  animation-name: supbroFlexCardFloat !important;
  animation-duration: var(--float-duration, 4.8s) !important;
  animation-timing-function: cubic-bezier(0.36, 0, 0.24, 1) !important;
}

.flex-gallery-shell .flex-gallery figure.has-edge-glow {
  transition:
    --pointer-lift 120ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 140ms ease,
    box-shadow 160ms ease,
    opacity 140ms ease !important;
}

.flex-gallery-shell .flex-gallery figure.has-edge-glow > .rb-border-stream {
  padding: 2px;
  opacity: 0.94;
  box-shadow:
    inset 0 0 0 1px rgba(224, 168, 255, 0.2),
    0 0 10px rgba(167, 70, 255, 0.22);
  transition: opacity 120ms ease, box-shadow 140ms ease;
}

.flex-gallery-shell .flex-gallery figure.has-edge-glow > .rb-border-stream::before {
  inset: -92%;
  background:
    conic-gradient(
      from 0deg,
      transparent 0 11%,
      rgba(156, 70, 255, 0.12) 14%,
      rgba(231, 156, 255, 0.72) 17%,
      rgba(255, 255, 255, 0.96) 19%,
      rgba(188, 83, 255, 0.62) 21%,
      transparent 25% 49%,
      rgba(134, 54, 255, 0.12) 53%,
      rgba(207, 104, 255, 0.82) 57%,
      rgba(255, 255, 255, 1) 61%,
      rgba(246, 194, 255, 1) 63%,
      rgba(178, 65, 255, 0.94) 68%,
      rgba(116, 51, 255, 0.2) 73%,
      transparent 79% 100%
    );
  animation-duration: var(--beam-duration, 2.8s) !important;
}

.flex-gallery-shell .flex-gallery figure.has-edge-glow.is-border-glowing > .rb-border-stream,
.flex-gallery-shell .flex-gallery figure.has-edge-glow:focus-within > .rb-border-stream {
  opacity: 1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    0 0 12px rgba(222, 145, 255, 0.56),
    0 0 24px rgba(141, 66, 255, 0.34);
}

@media (max-width: 860px) {
  body .section-panel .flex-gallery figure.has-edge-glow.is-motion-visible {
    animation-name: supbroFlexCardFloat !important;
    animation-duration: 5.8s !important;
  }

  .flex-gallery-shell .flex-gallery figure.has-edge-glow.is-motion-visible > .rb-border-stream::before {
    animation: supbro-edge-spin 3.4s linear var(--beam-delay, 0s) infinite var(--beam-direction, normal) !important;
    will-change: transform;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .section-panel .flex-gallery figure.has-edge-glow.is-motion-visible,
  .flex-gallery-shell .flex-gallery figure.has-edge-glow > .rb-border-stream::before {
    animation: none !important;
  }
}