/* ═══════════════════════════════════════════════════════════════
   DIMA UI — shared design-system layer for all site pages
   ─────────────────────────────────────────────────────────────
   Brand anchors: Seal Gray #CBCFD2 · Sunrise Orange #F74B01 ·
   Galaxy Black #060507. UI neutral scale (matches storefront v2):
   bg #111113 · bg-2 #191A1E · card #25262B · elevated #303137.
   Legacy variable names (--gold, --muted, --line, --line2) are
   ALIASED to the Dima tokens so existing inline styles keep
   working with zero edits. Vazirmatn, RTL-first.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --orange: #F74B01;
  --orange-2: #FF5E14;
  --orange-deep: #C03700;
  --seal: #CBCFD2;
  --galaxy: #060507;

  --bg: #111113;
  --bg-2: #191A1E;
  --card: #25262B;
  --card-2: #2B2C33;
  --elevated: #303137;
  --line: rgba(65, 66, 73, 0.55);
  --line-2: #414249;
  --text: #F5F5F5;
  --text-2: #A5A7AD;
  --text-3: #787A80;
  --glow: rgba(247, 75, 1, 0.12);

  /* legacy aliases (gold era -> Dima tokens) */
  --gold: var(--orange);
  --gold2: var(--orange-deep);
  --muted: var(--text-2);
  --green: #4CAF82;

  --font: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius: 14px; --radius-lg: 20px; --radius-xl: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 0.3s;
  --max-w: 1200px;
  --header-h: 76px;
  --touch: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.content-page {
  background:
    radial-gradient(52% 40% at 20% 0%, var(--glow), transparent 70%),
    var(--bg);
  min-height: 100vh;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.wrap { width: min(100% - 2 * 24px, var(--max-w)); margin-inline: auto; }

/* ═══ Shared header (static pages — CSS-only responsive) ═══ */
.sf-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(17, 17, 19, 0.88);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 1px 0 var(--line);
}
.sf-bar {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding-block: 10px;
}
.sf-logo { display: inline-flex; align-items: center; }
.sf-logo img { height: 30px; width: auto; }
.sf-nav { display: flex; align-items: center; gap: 24px; }
.sf-nav a {
  font-size: 14px; font-weight: 400; color: var(--text-2);
  min-height: var(--touch); display: inline-flex; align-items: center;
  transition: color var(--t) var(--ease);
}
.sf-nav a:hover { color: var(--text); }
.sf-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.sf-actions { display: flex; align-items: center; gap: 12px; }
.btn-header { min-height: 42px; padding: 0 22px; font-size: 14px; }

/* ═══ Buttons ═══ */
.btn, .btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch);
  padding: 0 28px;
  border-radius: 999px;
  font-size: 16px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: all var(--t) var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-2); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(247, 75, 1, 0.28); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--elevated); }

/* ═══ Shared footer ═══ */
.sf-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: 56px 28px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 32px;
}
.f-brand .sf-logo { margin-bottom: 16px; }
.f-slogan-fa { margin: 0 0 6px; font-size: 19px; font-weight: 600; color: var(--text); }
.f-slogan-en { margin: 0 0 20px; font-size: 13px; color: var(--text-3); letter-spacing: 0.04em; }
.f-note { font-size: 13px; color: var(--text-3); font-weight: 300; line-height: 2; max-width: 36ch; }
.f-col h3 { margin: 0 0 16px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.f-col a {
  display: flex; align-items: center;
  min-height: 38px;
  font-size: 14px; color: var(--text-2);
  transition: color var(--t) var(--ease);
}
.f-col a:hover { color: var(--orange); }
.f-bottom {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--text-3);
}

/* ═══ Legacy shell compatibility (page-shell era) ═══ */
.page-shell { position: relative; min-height: 100vh; }
.page-wrap { max-width: 860px; margin: 0 auto; padding: 40px 20px 72px; }
.page-card {
  background: linear-gradient(160deg, var(--card-2) 0%, var(--card) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.page-card > h1 { font-size: 30px; font-weight: 800; margin: 0 0 6px; }
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs .orb {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  filter: blur(40px);
}
.bg-orbs .orb1 { width: 480px; height: 480px; top: -140px; inset-inline-start: -120px; }
.bg-orbs .orb2 { width: 420px; height: 420px; bottom: -120px; inset-inline-end: -100px; }
.bg-orbs .grid-glow { display: none; }

/* ═══ Responsive ═══ */
@media (max-width: 1023px) {
  .sf-bar { gap: 12px; }
  .sf-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
  }
  .sf-nav::-webkit-scrollbar { display: none; }
  .sf-nav a { flex: 0 0 auto; }
  .sf-actions { margin-inline-start: auto; }
}
@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .sf-logo img { height: 24px; }
  .btn-header { display: none; }
  .page-card { padding: 26px 20px; }
  .page-wrap { padding: 20px 14px 56px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
