/* ==========================================================================
   RitmAI Hub — design tokens (dark premium, RTL)
   ========================================================================== */
:root {
  color-scheme: dark;

  --bg-primary: #060816;
  --bg-secondary: #0b1024;
  --surface: rgba(17, 24, 49, 0.66);
  --surface-strong: rgba(18, 27, 58, 0.9);
  --text-primary: #f7f8ff;
  --text-secondary: #aeb8d8;
  --text-mute: #7f8bab;
  --border-soft: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);

  --brand-cyan: #4de3ff;
  --brand-blue: #6574ff;
  --brand-purple: #a855f7;
  --brand-pink: #f056c7;

  --ok: #34d399;
  --warn: #fbbf24;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --shadow-sm: 0 8px 24px rgba(2, 6, 20, 0.35);
  --shadow-md: 0 22px 50px rgba(2, 6, 20, 0.45);
  --shadow-glow: 0 12px 40px rgba(77, 227, 255, 0.18);

  --font: "Vazirmatn", "IRANSansX", "Tahoma", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
  --header-h: 76px;
  --shell: min(1180px, calc(100% - 2rem));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100%;
}

body.hub-body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
  min-height: 100vh;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.015em;
  font-weight: 800;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--brand-blue);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 999px;
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 3px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.72rem 1.25rem;
  font-weight: 700;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.25s;
  text-align: center;
}

.btn--sm {
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
}

.btn--lg {
  padding: 0.9rem 1.45rem;
  font-size: 1.02rem;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  color: #061018;
  box-shadow: var(--shadow-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(77, 227, 255, 0.28);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-soft);
  color: var(--text-primary);
}

.btn--ghost:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
}

.btn--soon {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.btn--soon:hover,
.btn--soon:focus-visible {
  border-color: rgba(77, 227, 255, 0.45);
  color: var(--text-primary);
  cursor: pointer;
}

.btn__icon {
  font-size: 0.95em;
  opacity: 0.85;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
}

.status--live {
  color: #9af6d0;
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
}

.status--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.status--soon {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border-soft);
}

.chip--muted {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.toast {
  position: fixed;
  inset-inline: 0;
  bottom: 1.4rem;
  margin: 0 auto;
  width: min(420px, calc(100% - 2rem));
  z-index: 1200;
  padding: 0.95rem 1.1rem;
  border-radius: var(--r-md);
  background: rgba(14, 20, 42, 0.94);
  border: 1px solid rgba(77, 227, 255, 0.28);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  text-align: center;
  transform: translateY(18px);
  opacity: 0;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
