/**
 * gtirix · Grunge Custom Workshop (platform cards + VDO bridge)
 * Tokens from TZ; caution tape = white/black (product override).
 * Texts stay via data-i18n in index.html.
 */

#platform.block-gateways {
  --grunge-iron: #161a1e;
  --grunge-cast: #161a22;
  --grunge-canvas-a: #0e1013;
  --grunge-canvas-b: #121418;
  --grunge-emerald: #059669;
  --grunge-emerald-hot: #34d399;
  --grunge-cobalt: #2563eb;
  --grunge-cobalt-hot: #60a5fa;
  --grunge-needle: #ff5500;
  --grunge-tape-a: #f5f5f5;
  --grunge-tape-b: #111111;
  position: relative;
  overflow: visible;
  background:
    radial-gradient(ellipse 55% 40% at 18% 28%, rgba(5, 150, 105, 0.09), transparent 55%),
    radial-gradient(ellipse 48% 38% at 86% 72%, rgba(37, 99, 235, 0.1), transparent 52%),
    radial-gradient(ellipse 35% 28% at 48% 95%, rgba(0, 0, 0, 0.65), transparent 62%),
    linear-gradient(180deg, var(--grunge-canvas-a) 0%, var(--grunge-canvas-b) 48%, var(--grunge-canvas-a) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#platform.block-gateways::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E"),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 180px 180px, 28px 28px, 28px 28px;
  mix-blend-mode: overlay;
}

#platform.block-gateways::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 26% 16% at 10% 80%, rgba(12, 12, 8, 0.85), transparent 70%),
    radial-gradient(ellipse 20% 14% at 90% 18%, rgba(28, 24, 16, 0.55), transparent 70%),
    radial-gradient(ellipse 18% 12% at 55% 40%, rgba(20, 18, 12, 0.35), transparent 70%);
  opacity: 0.85;
}

#platform .site-wrap {
  position: relative;
  z-index: 2;
}

/* ── Cards ── */
#platform .card-buyer,
#platform .card-seller {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 28px 24px 24px;
  border-radius: 3px;
  overflow: visible;
  isolation: isolate;
  will-change: transform;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease,
    border-color 0.45s ease,
    filter 0.45s ease;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  /* jagged metal edge via mask on surface only — tape/bolts stay outside */
}

@media (min-width: 768px) {
  #platform .card-buyer,
  #platform .card-seller {
    padding: 32px 30px 28px;
    min-height: 460px;
  }
  #platform .card-buyer {
    transform: rotate(-1deg);
  }
  #platform .card-seller {
    transform: rotate(1deg);
  }
  /* hover: straighten (align), lift, slight scale */
  #platform .card-buyer:hover,
  #platform .card-seller:hover {
    transform: rotate(0deg) translateY(-6px) scale(1.015);
    z-index: 14;
  }
}

#platform .card-buyer {
  background:
    linear-gradient(155deg, rgba(5, 150, 105, 0.16) 0%, transparent 42%),
    var(--grunge-iron);
  border: 2px solid rgba(16, 185, 129, 0.4);
}
#platform .card-buyer:hover {
  border-color: var(--grunge-emerald-hot);
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.68),
    0 0 0 1px rgba(16, 185, 129, 0.4),
    0 0 48px rgba(16, 185, 129, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

#platform .card-seller {
  background:
    linear-gradient(205deg, rgba(37, 99, 235, 0.18) 0%, transparent 44%),
    var(--grunge-cast);
  border: 2px solid rgba(59, 130, 246, 0.4);
}
#platform .card-seller:hover {
  border-color: var(--grunge-cobalt-hot);
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.68),
    0 0 0 1px rgba(59, 130, 246, 0.4),
    0 0 48px rgba(37, 99, 235, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

#platform .card-surface {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
  /* рваные края — текстурный слой */
  clip-path: polygon(
    0.5% 1.5%,
    1.8% 0%,
    97.5% 0.8%,
    100% 2.2%,
    99.4% 97.2%,
    98.2% 100%,
    1.2% 99.2%,
    0% 97.5%
  );
}
#platform .card-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 150px 150px;
  mix-blend-mode: soft-light;
}
#platform .card-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, transparent 36%, rgba(255, 255, 255, 0.05) 48%, transparent 58%),
    radial-gradient(ellipse 55% 35% at 84% 10%, rgba(255, 255, 255, 0.05), transparent 62%);
}

#platform .card-scratches {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  mix-blend-mode: overlay;
  background-image:
    linear-gradient(108deg, transparent 0 42%, rgba(255, 255, 255, 0.55) 42.5%, transparent 43%),
    linear-gradient(95deg, transparent 0 58%, rgba(255, 255, 255, 0.35) 58.4%, transparent 59%),
    linear-gradient(12deg, transparent 0 71%, rgba(255, 255, 255, 0.28) 71.3%, transparent 72%);
  animation: grungeScratch 9s ease-in-out infinite alternate;
}
@keyframes grungeScratch {
  from {
    transform: translateX(0);
    opacity: 0.18;
  }
  to {
    transform: translateX(5px);
    opacity: 0.3;
  }
}

/* Spray graffiti accents */
#platform .card-spray {
  position: absolute;
  z-index: 0;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(22px);
  animation: grungeSpray 4.2s ease-in-out infinite;
}
#platform .card-buyer .card-spray {
  right: -40px;
  bottom: 32px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.7), transparent 70%);
}
#platform .card-seller .card-spray {
  left: -34px;
  bottom: 40px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.65), transparent 70%);
}
@keyframes grungeSpray {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(1);
  }
  50% {
    opacity: 0.52;
    transform: scale(1.1);
  }
}

/* Caution tape — white/black */
#platform .card-tape {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  height: 22px;
  width: 128px;
  background: repeating-linear-gradient(
    -45deg,
    var(--grunge-tape-a) 0 10px,
    var(--grunge-tape-b) 10px 20px
  );
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  opacity: 0.96;
  animation: grungeTape 5.5s ease-in-out infinite;
}
#platform .card-buyer .card-tape {
  top: 10px;
  right: -24px;
  transform: rotate(18deg);
}
#platform .card-seller .card-tape {
  top: 14px;
  left: -28px;
  transform: rotate(-14deg);
}
#platform .card-tape--paper {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  height: 18px;
  width: 100px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(220, 220, 220, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  opacity: 0.88;
}
#platform .card-buyer .card-tape--paper {
  bottom: 70px;
  left: -16px;
  transform: rotate(-8deg);
}
#platform .card-seller .card-tape--paper {
  bottom: 76px;
  right: -18px;
  transform: rotate(11deg);
}
@keyframes grungeTape {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.1);
  }
}

#platform .card-bolt {
  position: absolute;
  z-index: 5;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 30%, #ececec, #7a7a7a 55%, #222);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
#platform .card-bolt--tl {
  top: 7px;
  left: 7px;
}
#platform .card-bolt--tr {
  top: 7px;
  right: 7px;
}
#platform .card-bolt--bl {
  bottom: 7px;
  left: 7px;
}
#platform .card-bolt--br {
  bottom: 7px;
  right: 7px;
}

#platform .card-stamp {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1.5px solid currentColor;
  opacity: 0.38;
}
#platform .card-buyer .card-stamp {
  color: #6ee7b7;
  right: 16px;
  bottom: 108px;
  transform: rotate(-12deg);
}
#platform .card-seller .card-stamp {
  color: #93c5fd;
  left: 14px;
  bottom: 116px;
  transform: rotate(10deg);
}

#platform .card-tags {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 1.1rem;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
#platform .card-buyer .card-tags {
  color: rgba(110, 231, 183, 0.88);
}
#platform .card-seller .card-tags {
  color: rgba(147, 197, 253, 0.88);
}
#platform .card-tag-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  border: 1px dashed currentColor;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.4);
  font-size: 0.68rem;
}
#platform .card-diode {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  flex-shrink: 0;
  animation: grungeDiode 1.55s cubic-bezier(0, 0, 0.2, 1) infinite;
}
#platform .card-buyer .card-diode {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.95);
}
#platform .card-seller .card-diode {
  background: #60a5fa;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.95);
}
@keyframes grungeDiode {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.85);
  }
}

#platform .card-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
#platform .card-role-label {
  margin: 0;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
#platform .card-buyer .card-role-label {
  color: #34d399;
}
#platform .card-seller .card-role-label {
  color: #60a5fa;
}
@media (min-width: 768px) {
  #platform .card-role-label {
    font-size: 0.78rem;
  }
}

#platform .card-heading {
  margin: 0.4rem 0 0;
  font-family: "Russo One", Outfit, Manrope, sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff !important;
  text-shadow: 1px 2px 0 rgba(0, 0, 0, 0.55);
  transition: letter-spacing 0.35s ease;
}
#platform .card-buyer:hover .card-heading,
#platform .card-seller:hover .card-heading {
  letter-spacing: 0.07em;
}
@media (min-width: 768px) {
  #platform .card-heading {
    font-size: 1.75rem;
  }
}

#platform .card-icon-box {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.4);
  transition: transform 0.35s ease;
}
#platform .card-buyer .card-icon-box {
  color: #34d399;
}
#platform .card-seller .card-icon-box {
  color: #60a5fa;
}
#platform .card-buyer:hover .card-icon-box,
#platform .card-seller:hover .card-icon-box {
  transform: rotate(-6deg) scale(1.06);
}
#platform .card-icon-neon {
  width: 22px;
  height: 22px;
  color: currentColor !important;
}

#platform .card-body-text {
  position: relative;
  z-index: 2;
  margin-top: 1.15rem;
  font-size: 1.08rem;
  line-height: 1.7;
  color: rgba(210, 214, 220, 0.92);
}
#platform .card-body-text strong {
  color: #fff;
  font-weight: 700;
}
#platform .card-buyer .card-body-text strong:last-of-type {
  color: #6ee7b7;
  background: rgba(6, 78, 59, 0.55);
  border: 1px dashed rgba(52, 211, 153, 0.45);
  border-radius: 2px;
  padding: 1px 6px;
}
#platform .card-seller .card-body-text strong:last-of-type {
  color: #93c5fd;
  background: rgba(30, 58, 138, 0.5);
  border: 1px dashed rgba(96, 165, 250, 0.45);
  border-radius: 2px;
  padding: 1px 6px;
}

#platform .card-footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 1.15rem;
  display: flex;
  flex-direction: column;
}
#platform .card-hint {
  margin: 0 0 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 2.2em;
  font-family: "Special Elite", Manrope, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(156, 163, 175, 0.95) !important;
}
#platform .card-hint::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.35em;
  flex-shrink: 0;
  border-radius: 1px;
  background: #fff;
  box-shadow: 0 0 0 1px #111;
}

#platform .card-cta {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  border-radius: 3px;
  border: 2px solid rgba(0, 0, 0, 0.45);
  font-family: "Russo One", Outfit, Manrope, sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
#platform .card-cta-buyer {
  color: #0a0a0a;
  background: linear-gradient(90deg, #059669 0%, #0d9488 100%);
}
#platform .card-cta-seller {
  color: #fff;
  background: linear-gradient(90deg, #2563eb 0%, #4f46e5 100%);
}
#platform .card-cta-buyer:hover,
#platform .card-cta-seller:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.06);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
#platform .card-cta:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ── VDO Hot-Rod bridge ── */
#platform .hub-bridge {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0 0.35rem;
  margin: 0 auto;
}
@media (min-width: 1024px) {
  #platform .hub-bridge {
    width: 168px;
    min-height: 320px;
    padding: 0;
  }
}

#platform .hub-thread {
  display: none;
  width: 2px;
  height: 48px;
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 1024px) {
  #platform .hub-thread {
    display: block;
  }
}
#platform .hub-thread--up {
  background: linear-gradient(180deg, transparent, #34d399 40%, #059669);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.55);
  margin-bottom: 10px;
}
#platform .hub-thread--down {
  background: linear-gradient(180deg, #2563eb, #60a5fa 60%, transparent);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.55);
  margin-top: 10px;
}
#platform .hub-thread::after {
  content: "";
  position: absolute;
  left: -1px;
  width: 4px;
  height: 12px;
  background: #fff;
  border-radius: 1px;
  box-shadow: 0 0 8px #fff;
  animation: grungePulse 3.8s ease-in-out infinite;
}
#platform .hub-thread--down::after {
  animation-delay: 1.9s;
}
@keyframes grungePulse {
  0% {
    top: 0;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    top: calc(100% - 12px);
    opacity: 0;
  }
}

#platform .hub-node {
  position: relative;
  z-index: 2;
  width: 158px;
  height: 158px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 4px solid #4a5058;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.12), transparent 42%),
    radial-gradient(circle at 70% 78%, rgba(255, 85, 0, 0.1), transparent 48%),
    linear-gradient(145deg, #3a4048 0%, #1a1e24 48%, #0c0e12 100%);
  box-shadow:
    0 0 0 3px #1a1d22,
    0 12px 32px rgba(0, 0, 0, 0.7),
    inset 0 0 28px rgba(0, 0, 0, 0.55),
    inset 0 2px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
  touch-action: manipulation;
  overflow: visible;
}
#platform .hub-node:hover,
#platform .hub-node.is-active {
  border-color: rgba(255, 85, 0, 0.65);
  box-shadow:
    0 0 0 3px #1a1d22,
    0 0 42px rgba(255, 85, 0, 0.28),
    0 12px 32px rgba(0, 0, 0, 0.7),
    inset 0 0 28px rgba(0, 0, 0, 0.55);
}

#platform .hub-rivet,
#platform .hub-dots {
  display: none !important;
}

#platform .hub-node .tach-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}
#platform .hub-node .tach-overlay svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

#platform .hub-label {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  padding: 7px 16px;
  border: 2px solid #4a5058;
  border-radius: 2px;
  background: #1a1d22;
  font-family: "Russo One", Outfit, sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e8e6e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
#platform .hub-label::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 1px;
  vertical-align: 1px;
  background: var(--grunge-needle);
  box-shadow: 0 0 8px rgba(255, 85, 0, 0.9);
  animation: grungeDiode 1.4s ease-in-out infinite;
}
@media (min-width: 1024px) {
  #platform .hub-label {
    margin-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #platform .card-spray,
  #platform .card-tape,
  #platform .card-scratches,
  #platform .card-diode,
  #platform .hub-thread::after,
  #platform .hub-label::before {
    animation: none !important;
  }
  #platform .card-buyer,
  #platform .card-seller {
    transform: none !important;
  }
}
