/* Akhtar legal pages — header/footer match marketing; main is plain long-form (no overlays, no hero). */
:root {
  --bg: #0a0b10;
  --bg-elevated: #12131c;
  --bg-card: #161822;
  --gold: #d4af37;
  --gold-dim: #c5a059;
  --text: #f8f9fc;
  --text-muted: #b4bac8;
  --border: rgba(212, 175, 55, 0.22);
  --radius: 14px;
  --header-h: 72px;
  --max: 1120px;
  --legal-max: 760px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  /* Brand atmosphere — gradients on body only (no fixed layers over content). */
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(212, 175, 55, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 30%, rgba(99, 102, 241, 0.06), transparent 50%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  top: 0;
  left: 0;
  z-index: 100;
}
.skip:focus,
.skip:focus-visible {
  width: auto;
  height: auto;
  clip: auto;
  overflow: visible;
  white-space: normal;
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--gold);
  color: #0a0b10;
  font-weight: 600;
  inset-inline-start: 1rem;
  top: 1rem;
  outline: 2px solid #fff;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 11, 16, 0.92);
  backdrop-filter: blur(12px);
}
.header-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (max-width: 640px) {
  .header-inner {
    gap: 0.5rem;
    padding: 0 0.75rem;
  }
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  color: inherit;
}
.logo-mark img {
  height: clamp(26px, 5.2vw, 38px);
  width: auto;
  max-width: min(220px, 48vw);
  object-fit: contain;
  display: block;
}
.footer-brand .logo-mark img {
  height: clamp(24px, 4.6vw, 34px);
  max-width: min(200px, 55vw);
}
nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
nav a:hover { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-gold {
  background: linear-gradient(145deg, var(--gold), var(--gold-dim));
  color: #0a0b10;
  box-shadow: 0 4px 24px rgba(212, 175, 55, 0.35);
}
.btn-gold:hover {
  box-shadow: 0 6px 32px rgba(212, 175, 55, 0.45);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .header-end {
    flex-shrink: 0;
    gap: 0.25rem;
  }
}
.lang-toggle {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .lang-toggle {
    flex-shrink: 1;
    min-width: 0;
  }
}
#langEn,
#langFa { display: none; }
html:lang(en) #langFa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html:lang(fa) #langEn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html:lang(en) #langFa.lang-btn,
html:lang(fa) #langEn.lang-btn {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
}
.lang-btn {
  appearance: none;
  border: none;
  margin: 0;
  padding: 0.4rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  line-height: 1.2;
  transition: color 0.2s, background 0.2s;
}
@media (max-width: 640px) {
  .lang-btn {
    padding: 0.4rem 0.5rem;
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48px;
  }
}
.lang-btn:hover { color: var(--text); }
.lang-btn.is-active {
  background: rgba(212, 175, 55, 0.16);
  color: var(--gold);
}

html[dir="rtl"] body {
  font-family: Vazirmatn, Inter, system-ui, sans-serif;
}
html[dir="rtl"] .footer-grid,
html[dir="rtl"] .header-inner {
  direction: ltr;
}
html[dir="rtl"] .footer-brand p,
html[dir="rtl"] .footer-col h4,
html[dir="rtl"] .footer-col a,
html[dir="rtl"] .copyright {
  direction: rtl;
  text-align: right;
}
html[dir="rtl"] nav ul a {
  direction: rtl;
  text-align: right;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

@media (max-width: 900px) {
  .menu-toggle { display: none !important; }
  .header-nav-desktop-only { display: none !important; }
  nav {
    position: static;
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 0;
  }
  nav ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    overflow: hidden;
    min-width: 0;
    flex-shrink: 1;
    width: 100%;
    list-style: none;
  }
  .header-cta-desktop { display: none; }
  .header-cta-mobile {
    display: block;
    margin: 0;
    width: auto;
    flex-shrink: 0;
  }
  .header-cta-mobile .btn {
    padding: 0.42rem 0.7rem;
    font-size: clamp(0.62rem, 2.85vw, 0.74rem);
    font-weight: 700;
    line-height: 1.2;
    max-width: min(42vw, 9.75rem);
    white-space: normal;
    text-align: center;
    word-break: break-word;
  }
}
@media (min-width: 901px) {
  .header-cta-mobile { display: none; }
}

/* ——— Legal document (content-first; EN/FA toggled via html :lang, synced with landing-lang.js) ——— */
.legal-page {
  flex: 1 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* One language visible at a time (landing-lang.js sets html lang/dir) */
html:lang(en) .legal-lang-fa {
  display: none !important;
}
html:lang(fa) .legal-lang-en {
  display: none !important;
}

.legal-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 120px 20px 80px;
  color: #f8f9fc;
  line-height: 1.9;
  text-align: left;
}

/* English body: LTR even when chrome is RTL */
.legal-lang-en {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .legal-lang-en {
  direction: ltr;
  text-align: left;
}

.legal-lang-fa {
  direction: rtl;
  text-align: right;
  font-family: Vazirmatn, Inter, system-ui, sans-serif;
}

.legal-container h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 12px;
  color: #f8f9fc;
}

.legal-container.legal-lang-fa h1 {
  font-family: Vazirmatn, Georgia, serif;
}

.legal-container .last-updated {
  opacity: 0.6;
  font-size: 13px;
  color: #f8f9fc;
  margin-bottom: 2rem;
}

.legal-intro {
  margin-bottom: 0.5rem;
}

.legal-container section {
  margin-bottom: 0.25rem;
}

.legal-container h2 {
  font-family: Inter, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.35;
  margin-top: 32px;
  margin-bottom: 0.5rem;
  color: #f8f9fc;
}

.legal-lang-fa h2,
.legal-lang-fa h3 {
  font-family: Vazirmatn, Inter, system-ui, sans-serif;
}

.legal-container section:first-of-type h2 {
  margin-top: 24px;
}

.legal-container h3 {
  font-size: 1.05rem;
  font-weight: 650;
  margin-top: 1.125rem;
  margin-bottom: 0.5rem;
  color: #f8f9fc;
}

.legal-container p {
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 12px;
  color: #f8f9fc;
  max-width: 100%;
  overflow-wrap: break-word;
}

.legal-container ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
  font-size: 1rem;
  line-height: 1.9;
  color: #f8f9fc;
}

.legal-lang-fa ul {
  margin-right: 1.25rem;
  margin-left: 0;
}

.legal-container li {
  margin-bottom: 0.35rem;
}

.legal-container a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-container a:hover {
  color: var(--gold-dim);
}

@media (max-width: 600px) {
  .legal-container {
    padding: 88px 16px 64px;
  }
  .legal-container h1 {
    font-size: 26px;
  }
  .legal-container h2 {
    font-size: 18px;
  }
}

footer {
  flex-shrink: 0;
  background: #05060a;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 1.25rem 2rem;
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 280px;
}
.footer-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.footer-col a:hover { color: var(--gold); }
.social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.social a:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.copyright {
  max-width: var(--max);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}
