:root {
  --ink: #2b205c;
  --ink-deep: #171037;
  --paper: #ffffff;
  --mist: #f7f5fc;
  --violet: #6f5bb7;
  --gold: #d4af37;
  --gold-light: #f3e7ad;
  --gold-metal: linear-gradient(110deg, #725b19 0%, #d4af37 28%, #fff3bf 48%, #b9962f 66%, #f3e7ad 82%, #725b19 100%);
  --line: rgba(43, 32, 92, 0.14);
  --pad: clamp(20px, 4vw, 64px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(212, 175, 55, 0.13), transparent 24rem),
    radial-gradient(circle at 8% 30%, rgba(111, 91, 183, 0.12), transparent 28rem),
    var(--mist);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.36;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(43, 32, 92, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 32, 92, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.site-header {
  width: min(1180px, calc(100% - var(--pad) * 2));
  min-height: 96px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 700 16px/1 "Manrope", sans-serif;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand span {
  padding-inline-start: 12px;
  border-inline-start: 1px solid var(--line);
}

.language-toggle {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink);
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box,
    var(--gold-metal) border-box;
  box-shadow: 0 10px 28px rgba(43, 32, 92, 0.08);
  cursor: pointer;
  font: 700 11px/1 "DM Sans", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.language-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(43, 32, 92, 0.14);
}

.language-toggle:focus-visible,
.brand:focus-visible,
.legal-document a:focus-visible {
  outline: 3px solid rgba(212, 175, 55, 0.48);
  outline-offset: 4px;
}

.legal-page {
  width: min(1040px, calc(100% - var(--pad) * 2));
  margin: 0 auto;
  padding: clamp(64px, 9vw, 118px) 0 88px;
}

.legal-hero {
  position: relative;
  margin-bottom: clamp(34px, 5vw, 62px);
}

.legal-hero::after {
  content: "";
  position: absolute;
  top: -42px;
  inset-inline-end: 2%;
  width: clamp(130px, 22vw, 240px);
  aspect-ratio: 1;
  border: 1px solid rgba(43, 32, 92, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 32px rgba(43, 32, 92, 0.025),
    0 0 0 64px rgba(43, 32, 92, 0.018);
  pointer-events: none;
}

.legal-eyebrow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal-eyebrow::before {
  content: "";
  width: 42px;
  height: 2px;
  background: var(--gold-metal);
}

.legal-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0;
  font: 700 clamp(46px, 8.5vw, 104px)/0.9 "Manrope", sans-serif;
  letter-spacing: -0.065em;
}

.legal-hero h1 em {
  color: transparent;
  background: var(--gold-metal);
  background-clip: text;
  -webkit-background-clip: text;
  font-family: Georgia, serif;
  font-weight: 400;
}

html[dir="rtl"] .legal-hero h1 {
  font-family: "Alexandria", sans-serif;
  letter-spacing: -0.045em;
}

html[dir="rtl"] .legal-hero h1 em {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-style: normal;
}

.legal-card {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 6vw, 76px);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 34px 90px rgba(43, 32, 92, 0.11);
}

.legal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--gold-metal);
}

.legal-document {
  color: #302b47;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.82;
}

.legal-document.arabic {
  direction: rtl;
  font-family: "IBM Plex Sans Arabic", sans-serif;
}

.document-title {
  margin: 0;
  color: var(--ink);
  font: 700 clamp(34px, 5vw, 58px)/1 "Manrope", sans-serif;
  letter-spacing: -0.04em;
  text-align: center;
}

.arabic .document-title {
  font-family: "Alexandria", sans-serif;
  letter-spacing: -0.04em;
}

.document-subtitle {
  margin: 12px 0 0;
  color: rgba(43, 32, 92, 0.66);
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 500;
  text-align: center;
}

.effective-date {
  margin: 20px 0 0;
  color: var(--violet);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.legal-document hr {
  height: 1px;
  margin: 34px 0 42px;
  border: 0;
  background: var(--line);
}

.legal-document h2:not(.document-title) {
  margin: 48px 0 14px;
  color: var(--ink);
  font: 700 clamp(21px, 2.7vw, 29px)/1.2 "Manrope", sans-serif;
  letter-spacing: -0.035em;
}

.arabic h2:not(.document-title) {
  font-family: "Alexandria", sans-serif;
}

.legal-document p {
  margin: 0 0 18px;
}

.legal-document ul {
  margin: 16px 0 26px;
  padding-inline-start: 24px;
}

.legal-document li {
  margin: 10px 0;
  padding-inline-start: 8px;
}

.legal-document li::marker {
  color: var(--gold);
}

.legal-document strong {
  color: var(--ink);
}

.legal-document a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.legal-document bdi[dir="ltr"] {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.intro-copy {
  max-width: 780px;
  margin-inline: auto !important;
  color: rgba(43, 32, 92, 0.78);
  font-size: clamp(16px, 2vw, 19px);
  text-align: center;
}

.note {
  margin-top: 38px;
  padding: 22px 24px;
  border-inline-start: 3px solid var(--gold);
  background: rgba(243, 231, 173, 0.22);
}

.note p:last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: 30px var(--pad);
  color: rgba(255, 255, 255, 0.72);
  background: var(--ink);
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.08em;
}

html[dir="rtl"] body {
  font-family: "IBM Plex Sans Arabic", sans-serif;
}

html[dir="rtl"] .legal-eyebrow,
html[dir="rtl"] .language-toggle,
html[dir="rtl"] .site-footer {
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 640px) {
  .site-header {
    min-height: 78px;
  }

  .brand span {
    display: none;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .language-toggle {
    min-height: 40px;
    padding: 0 14px;
    font-size: 10px;
  }

  .legal-page {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .legal-hero h1 {
    font-size: clamp(44px, 15vw, 68px);
  }

  .legal-card {
    padding: 34px 22px;
  }

  .legal-document {
    line-height: 1.72;
  }

  .legal-document h2:not(.document-title) {
    margin-top: 38px;
  }
}

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

  .language-toggle {
    transition: none;
  }
}
