/* DMH Footer — DOMSTROY style (red accent) + Armenian font
   Responsive: desktop / tablet / mobile / very small
   Cross-browser: safe fallbacks
*/

.dmh-footer {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0;
  border-radius: 0;

  font-family: "Noto Sans Armenian", system-ui, -apple-system, Segoe UI, Roboto,
    Arial, sans-serif;

  /* Brand palette */
  --dmh-bg: #0f1115;
  --dmh-text: #f3f4f6;
  --dmh-muted: rgba(243, 244, 246, 0.72);
  --dmh-border: rgba(255, 255, 255, 0.12);

  --dmh-accent: #e11d2e;
  --dmh-accent2: #ff3b30;

  --dmh-panel: rgba(255, 255, 255, 0.04);
  --dmh-panel-strong: rgba(0, 0, 0, 0.3);

  /* Hover word visibility control */
  --dmh-hover-opacity: 0.38; /* ✅ чуть сильнее */
  --dmh-hover-opacity-hover: 0.52; /* ✅ на hover ещё виднее */
}

html[data-theme="dark"] .dmh-footer,
html.dark .dmh-footer,
body.dark .dmh-footer,
body.dmh-dark .dmh-footer {
  --dmh-bg: #0f1115;
  --dmh-text: #f3f4f6;
  --dmh-muted: rgba(243, 244, 246, 0.72);
  --dmh-border: rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] .dmh-footer,
html.light .dmh-footer,
body.light .dmh-footer,
body.dmh-light .dmh-footer {
  --dmh-bg: #ffffff;
  --dmh-text: #101318;
  --dmh-muted: rgba(16, 19, 24, 0.72);
  --dmh-border: rgba(0, 0, 0, 0.12);
  --dmh-panel: rgba(0, 0, 0, 0.03);
  --dmh-panel-strong: rgba(255, 255, 255, 0.75);

  /* в light режиме hover-слово делаем чуть слабее */
  --dmh-hover-opacity: 0.22;
  --dmh-hover-opacity-hover: 0.3;
}

.dmh-footer * {
  box-sizing: border-box;
}
.dmh-footer a {
  color: inherit;
}

/* Base bg */
.dmh-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--dmh-bg);
}

/* Glow bg */
.dmh-footer__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background: radial-gradient(
      120% 140% at 50% 0%,
      rgba(255, 255, 255, 0.06) 0%,
      rgba(0, 0, 0, 0) 55%
    ),
    radial-gradient(
      120% 120% at 18% 95%,
      rgba(225, 29, 46, 0.22) 0%,
      rgba(0, 0, 0, 0) 60%
    ),
    radial-gradient(
      120% 120% at 82% 95%,
      rgba(255, 59, 48, 0.14) 0%,
      rgba(0, 0, 0, 0) 60%
    );
}

/* Center container */
.dmh-footer__inner {
  position: relative;
  z-index: 3;
  max-width: 1400px;
  margin: 0 auto;

  /* ✅ padding по умолчанию (desktop) */
  padding: 52px 56px 132px;

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0)
  );
}

.dmh-footer__top {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr 1.1fr;
  gap: 42px;
  align-items: start;
}

.dmh-footer__brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.dmh-footer__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--dmh-panel);
  border: 1px solid var(--dmh-border);
  overflow: hidden;

  /* cross-browser safe shadow */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.dmh-footer__logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.dmh-footer__logo--placeholder {
  color: var(--dmh-accent);
  font-weight: 900;
}

.dmh-footer__brand-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--dmh-text);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.dmh-footer__brand-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--dmh-muted);
  max-width: 460px;
}

.dmh-footer__h {
  font-size: 18px;
  font-weight: 800;
  color: var(--dmh-text);
  margin-bottom: 14px;
}

.dmh-footer__h--sub {
  margin-top: 18px;
}

.dmh-footer__list,
.dmh-footer__contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.dmh-footer__list a,
.dmh-footer__contact a,
.dmh-footer__contact span {
  font-size: 16px;
  color: var(--dmh-muted);
  text-decoration: none;

  transition: color 0.18s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent; /* mobile nicer */
}

.dmh-footer__list a:hover,
.dmh-footer__contact a:hover {
  color: var(--dmh-accent2);
  transform: translateX(2px);
}

.dmh-footer__contact li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dmh-footer__ico {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dmh-accent);
  flex: 0 0 auto;
}
.dmh-footer__ico svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.dmh-footer__hr {
  margin: 28px 0 18px;
  height: 1px;
  background: var(--dmh-border);
}

/* ✅ Bottom row readability */
.dmh-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;

  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--dmh-border);
  background: var(--dmh-panel-strong);

  /* ✅ backdrop-filter with fallback */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);

  position: relative;
  z-index: 5;
}

@supports not (
  (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))
) {
  .dmh-footer__bottom {
    background: rgba(0, 0, 0, 0.45); /* fallback for old browsers */
  }
}

.dmh-footer__bottom-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dmh-footer__social {
  display: flex;
  gap: 12px;
  color: var(--dmh-muted);
}

.dmh-footer__social-a {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--dmh-border);
  background: rgba(255, 255, 255, 0.03);

  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease;
  color: var(--dmh-muted);
  text-decoration: none;
}

.dmh-footer__social-a:hover {
  transform: translateY(-2px);
  color: var(--dmh-accent2);
  border-color: rgba(225, 29, 46, 0.55);
  box-shadow: 0 12px 30px rgba(225, 29, 46, 0.18);
}

.dmh-footer__social-ico svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

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

.dmh-footer__bottom-links a {
  font-size: 14px;
  color: var(--dmh-muted);
  text-decoration: none;
  transition: color 0.18s ease;
}
.dmh-footer__bottom-links a:hover {
  color: var(--dmh-accent2);
}

.dmh-footer__dot {
  color: rgba(255, 255, 255, 0.2);
}
html[data-theme="light"] .dmh-footer__dot,
html.light .dmh-footer__dot,
body.light .dmh-footer__dot {
  color: rgba(0, 0, 0, 0.22);
}

.dmh-footer__createdby {
  font-size: 14px;
  color: var(--dmh-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.dmh-footer__createdby a {
  color: var(--dmh-text);
  text-decoration: none;
  border-bottom: 1px dashed rgba(225, 29, 46, 0.55);
}
.dmh-footer__createdby a:hover {
  color: var(--dmh-accent2);
}

.dmh-footer__copy {
  font-size: 14px;
  color: var(--dmh-muted);
}

/* ✅ Hover word (DOMSTROY) - make it MORE visible + still not blocking */
.dmh-footer__hoverwrap {
  position: absolute;
  left: 0;
  right: 0;

  /* ✅ поднимаем немного выше, чтобы слово было "в кадре" */
  bottom: -120px;

  height: 420px; /* ✅ больше высота -> лучше видно */
  z-index: 1; /* behind bottom row */
  pointer-events: none;

  opacity: var(--dmh-hover-opacity);
  transition: opacity 0.45s ease;

  display: none;
}

@media (min-width: 1024px) {
  .dmh-footer__hoverwrap {
    display: block;
  }
}

.dmh-footer.is-hover .dmh-footer__hoverwrap {
  opacity: var(--dmh-hover-opacity-hover);
}

.dmh-hovertext {
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* ✅ увеличить размер слова */
.dmh-hovertext__ghost,
.dmh-hovertext__stroke,
.dmh-hovertext__reveal {
  font-family: "Helvetica", Arial, sans-serif;
  font-weight: 900;
  font-size: 220px; /* ✅ больше */
  letter-spacing: 2px;
  text-transform: uppercase;
  fill: transparent;
  stroke-width: 2.8;
}

/* softer ghost */
.dmh-hovertext__ghost {
  stroke: rgba(243, 244, 246, 0.18);
  opacity: 0;
  transition: opacity 0.45s ease;
}

/* red stroke */
.dmh-hovertext__stroke {
  stroke: rgba(225, 29, 46, 0.92);
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  animation: dmhStrokeDraw 7.5s ease-in-out infinite;
}

html[data-theme="dark"] .dmh-hovertext__stroke,
html.dark .dmh-hovertext__stroke,
body.dark .dmh-hovertext__stroke {
  stroke: rgba(225, 29, 46, 0.68);
}

.dmh-hovertext__reveal {
  stroke: url(#dmhTextGradient);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.dmh-footer.is-hover .dmh-hovertext__ghost {
  opacity: 0.72;
}
.dmh-footer.is-hover .dmh-hovertext__reveal {
  opacity: 1;
}

@keyframes dmhStrokeDraw {
  0% {
    stroke-dashoffset: 1600;
  }
  65% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

/* ✅ Tablet */
@media (max-width: 1024px) {
  .dmh-footer__inner {
    padding: 40px 26px 28px;
    max-width: 980px;
  }
  .dmh-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 22px 26px;
  }
  .dmh-footer__brand-desc {
    max-width: none;
  }
  .dmh-footer__bottom {
    padding: 12px 12px;
    border-radius: 16px;
  }
}

/* ✅ Mobile */
@media (max-width: 640px) {
  .dmh-footer__inner {
    padding: 26px 16px 18px;
    max-width: 100%;
  }
  .dmh-footer__top {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .dmh-footer__brand-title {
    font-size: 22px;
  }
  .dmh-footer__h {
    font-size: 17px;
    margin-bottom: 10px;
  }
  .dmh-footer__list a,
  .dmh-footer__contact a,
  .dmh-footer__contact span {
    font-size: 15px;
  }
  .dmh-footer__bottom {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 12px;
  }
  .dmh-footer__copy {
    font-size: 13px;
  }
  .dmh-footer__bottom-links a {
    font-size: 13px;
  }
}

/* ✅ Very small / old devices (320px etc.) */
@media (max-width: 360px) {
  .dmh-footer__inner {
    padding: 22px 12px 16px;
  }
  .dmh-footer__brand-title {
    font-size: 20px;
  }
  .dmh-footer__brand-desc {
    font-size: 14px;
  }
  .dmh-footer__social-a {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }
  .dmh-footer__bottom {
    border-radius: 14px;
    padding: 10px;
  }
}

/* ✅ Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .dmh-footer__list a,
  .dmh-footer__contact a,
  .dmh-footer__social-a {
    transition: none !important;
  }
  .dmh-hovertext__stroke {
    animation: none !important;
  }
}
/* =========================
   FIX: DOMSTROY hover text visible + animated on all widths
   Paste at the END of footer.css
========================= */

/* show always (not only >=1024) */
.dmh-footer__hoverwrap {
  display: block !important;
  opacity: 0.48 !important; /* чуть виднее */
  bottom: -110px !important;
  height: 420px !important;
}

/* responsive sizing of the big word */
.dmh-hovertext__ghost,
.dmh-hovertext__stroke,
.dmh-hovertext__reveal {
  font-size: clamp(
    110px,
    18vw,
    230px
  ) !important; /* виден и на планшете/мобиле */
  stroke-width: 2.8 !important;
}

/* keep bottom row always above */
.dmh-footer__bottom {
  position: relative !important;
  z-index: 50 !important;
}

/* force animation even if something overwrote it */
.dmh-hovertext__stroke {
  animation: dmhStrokeDraw 7.5s ease-in-out infinite !important;
}

/* if user has reduced-motion enabled, still animate (по твоей просьбе) */
@media (prefers-reduced-motion: reduce) {
  .dmh-hovertext__stroke {
    animation: dmhStrokeDraw 7.5s ease-in-out infinite !important;
  }
}

/* small screens: reduce height a bit so it doesn't cover too much */
@media (max-width: 640px) {
  .dmh-footer__hoverwrap {
    bottom: -140px !important;
    height: 320px !important;
    opacity: 0.34 !important;
  }
}
/* FIX: make DOMSTROY a bit smaller so whole word fits */
.dmh-footer__hoverwrap {
  bottom: -120px !important; /* чуть ниже */
  height: 380px !important; /* меньше высота */
  opacity: 0.38 !important;
}

/* ✅ главное: уменьшаем размер текста */
.dmh-hovertext__ghost,
.dmh-hovertext__stroke,
.dmh-hovertext__reveal {
  font-size: clamp(90px, 13vw, 170px) !important; /* было слишком большое */
  stroke-width: 2.6 !important;
}

/* keep svg normal width (no 120% / 170%) */
.dmh-hovertext {
  width: 100% !important;
  left: 0 !important;
  transform: none !important;
}

/* tablet */
@media (max-width: 1024px) {
  .dmh-hovertext__ghost,
  .dmh-hovertext__stroke,
  .dmh-hovertext__reveal {
    font-size: clamp(80px, 14vw, 140px) !important;
  }
  .dmh-footer__hoverwrap {
    bottom: -135px !important;
    height: 320px !important;
    opacity: 0.3 !important;
  }
}

/* mobile */
@media (max-width: 640px) {
  .dmh-hovertext__ghost,
  .dmh-hovertext__stroke,
  .dmh-hovertext__reveal {
    font-size: clamp(64px, 16vw, 110px) !important;
  }
  .dmh-footer__hoverwrap {
    bottom: -150px !important;
    height: 260px !important;
    opacity: 0.22 !important;
  }
}
