/*
 * Hasht global foundation
 * Shared by every legacy page and mirrored by the new Sass design system.
 */
@import url("./tokens.css");

@font-face {
  font-family: "Vazirmatn";
  src: local("Vazirmatn");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-brand: "Vazirmatn Variable", "Vazirmatn", Tahoma, system-ui, sans-serif;
  --font: var(--font-brand);
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--font-brand) !important;
}

code,
pre,
kbd,
samp {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace !important;
}

/* در پروفایل سخت‌افزاری ضعیف، کل تجربه بدون حرکت و با اسکرول عادی اجرا می‌شود. */
html[data-performance-tier="low"] *,
html[data-performance-tier="low"] *::before,
html[data-performance-tier="low"] *::after {
  animation: none !important;
  transition-duration: 0s !important;
  scroll-behavior: auto !important;
}

/* The document uses one accessible brand rail instead of the browser rail. */
html,
body,
body.page-panel .main__scroll {
  scrollbar-width: none !important;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
body.page-panel .main__scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.custom-scroll {
  --smart-scroll-rgb: 240, 86, 61;
  position: fixed;
  z-index: 920;
  inset-block: 0.38rem;
  right: 0.2rem;
  width: 1.05rem;
  direction: ltr;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.custom-scroll[data-global-scroll-ready="true"] {
  opacity: 0;
}

.custom-scroll[data-global-scroll-ready="true"].is-scrollable {
  opacity: 1;
}

.custom-scroll__rail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  outline: none;
  pointer-events: auto;
  touch-action: none;
  cursor: pointer;
}

.custom-scroll__rail:focus-visible {
  outline: 1px solid rgb(var(--smart-scroll-rgb));
  outline-offset: 1px;
}

.custom-scroll__thumb {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 50%;
  width: 0.34rem;
  min-height: 1.9rem;
  border-radius: 999px;
  background: rgb(var(--smart-scroll-rgb));
  box-shadow: 0 0 0.72rem rgba(var(--smart-scroll-rgb), 0.16);
  transform: translate(-50%, 0);
  transform-origin: top center;
  cursor: grab;
  transition: width 0.22s, box-shadow 0.22s;
  will-change: transform, height;
}

.custom-scroll__rail:hover .custom-scroll__thumb,
.custom-scroll__rail:focus-visible .custom-scroll__thumb,
.custom-scroll-dragging .custom-scroll__thumb {
  width: 0.43rem;
  box-shadow: 0 0 0.95rem rgba(var(--smart-scroll-rgb), 0.28);
}

.custom-scroll-dragging {
  cursor: grabbing;
  user-select: none;
}

/* Compact shared shell for pages that do not own the landing-page header/footer. */
.hasht-global-header {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h, 4.25rem);
  padding: 0.65rem clamp(1rem, 4vw, 2.5rem);
  color: var(--text, #fafaf7);
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  background: var(--glass-bg, rgba(20, 23, 28, 0.9));
  backdrop-filter: blur(18px);
}

body.page-panel.hasht-global-shell-mounted {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100dvh;
  overflow: hidden;
}

body.page-panel.hasht-global-shell-mounted > .shell {
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

body.page-panel.hasht-global-shell-mounted > .shell .main,
body.page-panel.hasht-global-shell-mounted > .shell .sidebar {
  height: 100%;
  max-height: 100%;
}

body.page-panel.hasht-global-shell-mounted > .hasht-global-footer {
  padding-block: 0.55rem;
  font-size: 0.78rem;
}

.hasht-global-header__brand,
.hasht-global-header__nav,
.hasht-global-footer__nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.hasht-global-header a,
.hasht-global-footer a {
  color: inherit;
  text-decoration: none;
}

.hasht-global-header__brand {
  font-weight: 850;
}

.hasht-global-header__brand img {
  width: 2.7rem;
  height: 2.7rem;
  object-fit: contain;
}

.hasht-global-header__nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--text-dim, rgba(250, 250, 247, 0.72));
  font-size: 0.9rem;
}

.hasht-global-header__cta {
  padding: 0.55rem 0.9rem;
  color: var(--on-gold, #14171c) !important;
  border-radius: 999px;
  background: var(--grad-path, linear-gradient(90deg, #f0563d, #16b583, #f0b429));
  font-weight: 800;
}

.hasht-global-footer {
  position: relative;
  z-index: 10;
  display: grid;
  gap: 0.8rem;
  padding: 1.6rem clamp(1rem, 4vw, 2.5rem);
  color: var(--text-dim, rgba(250, 250, 247, 0.7));
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  background: var(--bg-raised, #191d24);
  text-align: center;
}

.hasht-global-footer__nav {
  justify-content: center;
  flex-wrap: wrap;
}

.hasht-global-footer p {
  margin: 0;
}

@media (max-width: 700px) {
  .hasht-global-header {
    align-items: flex-start;
  }

  .hasht-global-header__nav {
    gap: 0.6rem;
    font-size: 0.78rem;
  }

  .hasht-global-header__nav a:not(.hasht-global-header__cta) {
    display: none;
  }
}


/* R147 — dynamic Caps Lock state for English-oriented inputs. */
.hasht-capslock-warning-r147 {
  display: block;
  margin-top: .38rem;
  color: #b66b00;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.65;
  direction: rtl;
  text-align: right;
}
.hasht-capslock-warning-r147[hidden] { display: none !important; }
.hasht-capslock-active-r147 {
  border-color: #d89d38 !important;
  box-shadow: 0 0 0 3px rgba(216,157,56,.12) !important;
}

/* R147 — dynamic English-field assistance. */
.hasht-email-policy-warning-r147{display:block;margin:.35rem 0 0;color:#b42318;font-size:.78rem;font-weight:700;line-height:1.75;direction:rtl;text-align:right}
.hasht-email-policy-warning-r147[hidden]{display:none!important}

/* R148 — standalone Caps Lock status, independent from homepage/module initialization. */
.hasht-capslock-warning-r148{display:block;margin:.35rem 0 0;color:#b66b00;font-size:.78rem;font-weight:800;line-height:1.7;direction:rtl;text-align:right}
.hasht-capslock-warning-r148[hidden]{display:none!important}
.hasht-capslock-active-r148{border-color:#d89d38!important;box-shadow:0 0 0 3px rgba(216,157,56,.14)!important}
[data-theme="dark"] .hasht-capslock-warning-r148{color:#f4c36d}


/* R207 — سایهٔ کارت‌ها متقارن حول خود کارت است، نه متمایل به پایین. */
.activity-card,
.voice-card,
.news-card,
.news-page-card,
.contact-card {
  box-shadow:0 0 1.35rem color-mix(in srgb, var(--shadow-drop) 30%, transparent);
}
.activity-card:hover,
.voice-card:hover,
.news-card:hover,
.news-page-card:hover {
  box-shadow:0 0 1.95rem color-mix(in srgb, var(--shadow-drop) 46%, transparent);
}
