:root {
  --dv-motion: cubic-bezier(.16, 1, .3, 1);
  --dv-neon-soft: 0 0 18px rgba(255, 23, 69, .16);
  --dv-neon-button: 0 9px 28px rgba(255, 23, 69, .24);
}

button,
a,
input,
.brand img,
.product-card,
.auth-card,
.news-card,
.purchase-item,
.ledger-item,
.support-card,
.profile-card,
.trust-strip > div,
.hero-points > span,
.balance-card {
  transition:
    transform .42s var(--dv-motion),
    border-color .32s ease,
    box-shadow .42s var(--dv-motion),
    background-color .32s ease,
    color .25s ease,
    filter .32s ease;
}

.product-card,
.auth-card,
.news-card,
.purchase-item,
.ledger-item,
.support-card,
.profile-card,
.balance-card {
  will-change: transform;
}

.hero-copy h1,
.hero-copy h1 em {
  transition: color .3s ease, text-shadow .45s var(--dv-motion), transform .45s var(--dv-motion);
}

.hero-copy h1 em {
  display: inline-block;
  text-shadow: 0 0 12px rgba(255, 23, 69, .16);
}

.hero-points > span {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 10px;
}

.product-card::before {
  transition: opacity .45s var(--dv-motion), transform .6s var(--dv-motion), filter .45s ease;
}

.primary,
.secondary,
.details-button,
.dialog-close,
.topbar nav button,
.account-button,
.top-actions > a,
.site-footer a {
  transition:
    transform .32s var(--dv-motion),
    box-shadow .35s var(--dv-motion),
    border-color .28s ease,
    background-color .28s ease,
    color .25s ease,
    filter .28s ease;
}

input:focus {
  box-shadow: 0 0 0 3px rgba(255, 23, 69, .1), 0 0 22px rgba(255, 23, 69, .08);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(255, 79, 112, .9);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover img {
    filter: brightness(1.08) drop-shadow(0 0 10px rgba(255, 23, 69, .5));
    transform: scale(1.045);
  }

  .hero-copy h1:hover {
    transform: translateY(-3px);
  }

  .hero-copy h1:hover em {
    text-shadow: 0 0 10px rgba(255, 23, 69, .55), 0 0 28px rgba(255, 23, 69, .25);
  }

  .hero-points > span:hover {
    color: #fff;
    border-color: rgba(255, 23, 69, .32);
    background: rgba(255, 23, 69, .065);
    box-shadow: 0 0 18px rgba(255, 23, 69, .09);
    transform: translateY(-3px);
  }

  .product-card:hover {
    border-color: rgba(255, 23, 69, .5);
    box-shadow: 0 24px 52px rgba(0, 0, 0, .58), 0 0 22px rgba(255, 23, 69, .16);
    transform: translateY(-10px) scale(1.012);
  }

  .product-card:hover::before {
    opacity: .34;
    filter: blur(54px) saturate(1.25);
    transform: scale(1.14);
  }

  .product-card:hover .details-button {
    border-color: rgba(255, 23, 69, .5);
    color: #fff;
    box-shadow: var(--dv-neon-soft);
    transform: translateX(3px);
  }

  .auth-card:hover,
  .support-card:hover,
  .profile-card:hover {
    border-color: rgba(255, 23, 69, .32);
    box-shadow: 0 32px 85px rgba(0, 0, 0, .58), 0 0 22px rgba(255, 23, 69, .1);
    transform: translateY(-5px);
  }

  .news-card:hover,
  .purchase-item:hover,
  .ledger-item:hover,
  .balance-card:hover {
    border-color: rgba(255, 23, 69, .3);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .36), 0 0 16px rgba(255, 23, 69, .08);
    transform: translateY(-4px);
  }

  .trust-strip > div:hover {
    background: rgba(255, 23, 69, .045);
    box-shadow: inset 0 0 24px rgba(255, 23, 69, .055);
  }

  .primary:not(:disabled):hover {
    box-shadow: var(--dv-neon-button);
    filter: brightness(1.07);
    transform: translateY(-2px) scale(1.012);
  }

  .secondary:hover,
  .details-button:hover {
    border-color: rgba(255, 23, 69, .55);
    box-shadow: var(--dv-neon-soft);
    transform: translateY(-2px);
  }

  .topbar nav button:hover,
  .account-button:hover {
    color: #fff;
    box-shadow: inset 0 0 20px rgba(255, 23, 69, .075), 0 0 14px rgba(255, 23, 69, .07);
    transform: translateY(-2px);
  }

  .topbar nav button.active {
    border-color: rgba(255, 23, 69, .22);
    box-shadow: inset 0 -2px 0 rgba(255, 23, 69, .72), 0 0 14px rgba(255, 23, 69, .08);
  }

  .top-actions > a:hover,
  .site-footer a:hover {
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 23, 69, .35);
    transform: translateY(-1px);
  }

  button:active,
  .primary:active,
  .secondary:active,
  .details-button:active {
    transform: translateY(0) scale(.985);
    transition-duration: .08s;
  }
}

.control-panel-button {
  border: 1px solid rgba(255, 23, 69, .5);
  background: rgba(255, 23, 69, .1);
  color: #fff;
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
}

.control-panel-button:hover {
  border-color: var(--red);
  background: rgba(255, 23, 69, .18);
  box-shadow: 0 0 22px rgba(255, 23, 69, .18);
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.social-links-header {
  flex: 0 0 auto;
}

.social-links-hero {
  margin-top: 24px;
}

.social-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 10px 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(27, 30, 38, .72), rgba(9, 10, 14, .5));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 12px 28px rgba(0, 0, 0, .2);
  color: #f6f7f9;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .045em;
  text-decoration: none;
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
}

.social-button::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1px;
  opacity: 0;
  background: radial-gradient(circle at 25% 15%, rgba(255, 255, 255, .16), transparent 40%), linear-gradient(135deg, rgba(255, 23, 69, .23), transparent 68%);
  transition: opacity .32s ease;
}

.social-button.social-news {
  border-color: rgba(255, 23, 69, .38);
  background: linear-gradient(135deg, rgba(255, 23, 69, .17), rgba(52, 9, 20, .28));
}

.social-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  line-height: 1;
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 23, 69, .16);
}

.social-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, .16));
}

.social-news .social-icon {
  border: 1px solid rgba(255, 23, 69, .5);
  background: rgba(255, 23, 69, .18);
  box-shadow: 0 0 15px rgba(255, 23, 69, .24), inset 0 0 9px rgba(255, 23, 69, .12);
}

@media (hover: hover) and (pointer: fine) {
  .social-button:hover {
    border-color: rgba(255, 23, 69, .68);
    color: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .28), 0 0 22px rgba(255, 23, 69, .17);
    transform: translateY(-3px);
  }

  .social-button:hover::after {
    opacity: 1;
  }

  .social-button:hover .social-icon {
    background: rgba(255, 23, 69, .22);
    box-shadow: 0 0 18px rgba(255, 23, 69, .35);
    transform: rotate(-8deg) scale(1.08);
  }
}

@media (max-width: 1180px) {
  .social-links-header .social-label {
    display: none;
  }

  .social-links-header .social-button {
    width: 40px;
    padding-inline: 9px;
  }
}

@media (max-width: 760px) {
  .social-links-header {
    margin-left: auto;
  }

  .social-links-hero {
    align-items: stretch;
  }

  .social-links-hero .social-button {
    flex: 1 1 180px;
  }
}

@media (max-width: 520px) {
  .social-links-header {
    gap: 6px;
  }

  .social-links-header .social-button {
    width: 34px;
    min-height: 34px;
    padding: 6px;
  }

  .social-links-header .social-icon {
    width: 18px;
    height: 18px;
  }
}

.top-actions > .external-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 23, 69, .58);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 23, 69, .2), rgba(255, 23, 69, .08));
  color: #fff;
  font-weight: 800;
  letter-spacing: .055em;
  box-shadow: 0 0 18px rgba(255, 23, 69, .08);
}

.top-actions > .external-store-button:hover,
.top-actions > .external-store-button:focus-visible {
  border-color: var(--red);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(255, 23, 69, .2);
  outline: none;
}

@media (max-width: 900px) {
  .top-actions > .external-store-button { display: inline-flex; }
}

@media (max-width: 620px) {
  .top-actions > .external-store-button {
    padding: 9px;
    font-size: 0;
  }
  .top-actions > .external-store-button::after {
    content: "МАГАЗИН";
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
