/* Stoned Inc — shared header brand (public site + employee app) */

.pub-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--stone-900, #1a2420);
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
button.pub-brand {
  border: none;
  margin: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  text-align: inherit;
}
button.pub-brand--app {
  padding: 0.4rem 0.6rem 0.45rem;
}
button.pub-brand--app.pub-brand--video {
  padding: 0.4rem 0.6rem 0.45rem;
}
.pub-brand:hover {
  transform: translateY(-1px);
}
@media (hover: none) and (pointer: coarse) {
  .pub-brand--menu-toggle,
  .pub-brand--menu-toggle:hover,
  .pub-brand--app.pub-brand--menu-toggle:hover {
    transform: none;
  }
}

.pub-brand-logo {
  display: block;
  height: clamp(2.5rem, 6vw, 3.25rem);
  width: auto;
  max-width: min(280px, 68vw);
}

/* Public marketing header */
.pub-brand--header {
  padding: 0.15rem 0.35rem;
}
.pub-brand--header:hover {
  background: transparent;
  opacity: 0.85;
}
.pub-brand--header .pub-brand-logo {
  height: clamp(2.75rem, 7vw, 3.5rem);
  max-width: min(320px, 72vw);
}

/* Employee app topbar (green bar) */
.pub-brand--app:not(.pub-brand--menu-toggle) {
  padding: 0.3rem 0.65rem 0.3rem 0.45rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}
.pub-brand--app:not(.pub-brand--menu-toggle):hover {
  background: #fff;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
}
.pub-brand--app.pub-brand--menu-toggle {
  padding: 0.18rem;
  background: transparent;
  border: none;
  box-shadow: none;
  justify-content: center;
}
.pub-brand--app .pub-brand-logo {
  height: 3.25rem;
  max-width: min(210px, 42vw);
}

/* Login card */
.pub-brand--card {
  justify-content: center;
  padding: 0;
}
.pub-brand--card:hover {
  transform: none;
  background: transparent;
}
.pub-brand--card .pub-brand-logo {
  height: clamp(3rem, 12vw, 3.75rem);
  max-width: min(300px, 88vw);
}

/* Spinning logo video above Stoned Inc wordmark */
.pub-brand--video {
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}
.pub-brand-video {
  display: block;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
}
.pub-brand-wordmark {
  width: auto;
  max-width: 100%;
}
.pub-brand--app.pub-brand--video {
  padding: 0.4rem 0.6rem 0.45rem;
  gap: 0.2rem;
}
.pub-brand--app .pub-brand-video {
  height: 3.25rem;
  width: 3.25rem;
}
.pub-brand--app .pub-brand-wordmark {
  height: 1.05rem;
  max-width: min(118px, 34vw);
}
.pub-brand--card.pub-brand--video {
  gap: 0.55rem;
}
.pub-brand--card .pub-brand-video {
  height: clamp(4.25rem, 17vw, 5.25rem);
  width: clamp(4.25rem, 17vw, 5.25rem);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(28, 28, 28, 0.12);
}
.pub-brand--card .pub-brand-wordmark {
  height: clamp(1.85rem, 7vw, 2.35rem);
  max-width: min(260px, 82vw);
}

@media (max-width: 520px) {
  .pub-brand--app .pub-brand-video {
    height: 2.75rem;
    width: 2.75rem;
  }
  .pub-brand--app .pub-brand-wordmark {
    height: 0.9rem;
    max-width: min(100px, 40vw);
  }
}

/* CSS coin — reliable spin on phones (video autoplay often blocked) */
.pub-brand-coin-scene {
  display: none;
  --brand-coin-size: 3.25rem;
  --brand-coin-thickness: 0.28rem;
  width: var(--brand-coin-size);
  height: var(--brand-coin-size);
  flex-shrink: 0;
  perspective: 520px;
  perspective-origin: 50% 42%;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.22));
}
.pub-brand-coin-tilt {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  animation: pub-brand-coin-tilt 4.8s ease-in-out infinite;
  will-change: transform;
}
.pub-brand-coin {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  animation: pub-brand-coin-spin 4.2s linear infinite;
  will-change: transform;
}
.pub-brand-coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(139, 197, 63, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.2);
}
.pub-brand-coin-face img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.pub-brand-coin-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.28) 0%,
    transparent 40%,
    transparent 60%,
    rgba(0, 0, 0, 0.18) 100%
  );
  pointer-events: none;
}
.pub-brand-coin-face--front {
  transform: translateZ(calc(var(--brand-coin-thickness) / 2));
}
.pub-brand-coin-face--back {
  transform: rotateY(180deg) translateZ(calc(var(--brand-coin-thickness) / 2));
}
.pub-brand-coin-face--back img {
  transform: scaleX(-1);
}
.pub-brand-coin-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: translateZ(0);
  box-shadow:
    inset 0 0 0 0.2rem #8bc53f,
    inset 0 0 0 0.3rem rgba(26, 36, 32, 0.75);
  pointer-events: none;
}
@keyframes pub-brand-coin-spin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}
@keyframes pub-brand-coin-tilt {
  0%, 100% { transform: rotateX(12deg); }
  50% { transform: rotateX(18deg); }
}

.pub-brand--app .pub-brand-coin-scene {
  --brand-coin-size: 3.25rem;
}
.pub-brand--card .pub-brand-coin-scene {
  --brand-coin-size: clamp(4.25rem, 17vw, 5.25rem);
  --brand-coin-thickness: 0.34rem;
  filter: drop-shadow(0 6px 16px rgba(28, 28, 28, 0.14));
}

@media (max-width: 900px) {
  .pub-brand--video .pub-brand-video {
    display: none !important;
  }
  .pub-brand--video .pub-brand-coin-scene {
    display: block;
  }
}

/* App topbar — new spinning coin video (mobile + desktop) */
.pub-brand--app-coin .pub-app-menu-coin {
  width: 3.25rem;
  height: 3.25rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
}
.pub-brand--app-coin .pub-app-menu-coin-video {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(168, 230, 58, 0.42),
    0 4px 12px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

/* App topbar — VIP dark coin (logo-dark.mp4), not logoo.mp4 */
.pub-brand--dark-coin .pub-vips-coin-scene {
  --vip-coin-size: 3.25rem;
  --vip-coin-thickness: 0.3rem;
  width: var(--vip-coin-size);
  height: var(--vip-coin-size);
  margin: 0;
  perspective: 520px;
  perspective-origin: 50% 42%;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
}
.pub-brand--dark-coin .pub-vips-coin-scene--video {
  perspective: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pub-brand--dark-coin .pub-vips-coin-video {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(168, 230, 58, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.28);
}
.pub-brand--dark-coin .pub-vips-coin-tilt {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  animation: pub-vips-coin-tilt 4.8s ease-in-out infinite;
  will-change: transform;
}
.pub-brand--dark-coin .pub-vips-coin {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  animation: pub-vips-coin-spin 5.2s linear infinite;
  will-change: transform;
}
.pub-brand--dark-coin .pub-vips-coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(168, 230, 58, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.28);
}
.pub-brand--dark-coin .pub-vips-coin-face img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.pub-brand--dark-coin .pub-vips-coin-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 38%,
    transparent 62%,
    rgba(0, 0, 0, 0.28) 100%
  );
  pointer-events: none;
}
.pub-brand--dark-coin .pub-vips-coin-face--front {
  transform: translateZ(calc(var(--vip-coin-thickness) / 2));
}
.pub-brand--dark-coin .pub-vips-coin-face--back {
  transform: rotateY(180deg) translateZ(calc(var(--vip-coin-thickness) / 2));
}
.pub-brand--dark-coin .pub-vips-coin-face--back img {
  transform: scaleX(-1);
}
.pub-brand--dark-coin .pub-vips-coin-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: translateZ(0);
  box-shadow:
    inset 0 0 0 0.28rem #8bc53f,
    inset 0 0 0 0.42rem rgba(26, 36, 32, 0.85),
    0 0 12px rgba(144, 198, 79, 0.32);
  pointer-events: none;
}
@keyframes pub-vips-coin-spin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}
@keyframes pub-vips-coin-tilt {
  0%, 100% { transform: rotateX(11deg); }
  50% { transform: rotateX(17deg); }
}
@media (min-width: 901px) {
  .pub-brand--dark-coin .pub-vips-coin-scene--css {
    display: none !important;
  }
  .pub-brand--dark-coin .pub-vips-coin-scene--video {
    display: flex !important;
  }
}
@media (max-width: 900px) {
  .pub-brand--dark-coin .pub-vips-coin-scene--video {
    display: none !important;
  }
  .pub-brand--dark-coin .pub-vips-coin-scene--css {
    display: block !important;
  }
}

@media (max-width: 520px) {
  .pub-brand--app .pub-brand-coin-scene {
    --brand-coin-size: 2.75rem;
  }
  .pub-brand--app.pub-brand--dark-coin .pub-vips-coin-scene {
    --vip-coin-size: 2.75rem;
  }
  .pub-brand--app.pub-brand--app-coin .pub-app-menu-coin {
    width: 2.75rem;
    height: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pub-brand-coin-tilt,
  .pub-brand-coin,
  .pub-brand--dark-coin .pub-vips-coin-tilt,
  .pub-brand--dark-coin .pub-vips-coin {
    animation: none;
  }
  .pub-brand-coin,
  .pub-brand--dark-coin .pub-vips-coin {
    transform: rotateY(-24deg);
  }
}