:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --subtle: #11151a;
  --surface: #171b21;
  --raised: #20262e;
  --text: #f5f6f8;
  --muted: #a7aeb9;
  --quiet: #939ca9;
  --gold: #d6ad52;
  --gold-hover: #e8c574;
  --line: #ffffff16;
  --line-strong: #ffffff2b;
  --shell: 1320px;
  --gutter: clamp(20px, 4vw, 60px);
  --nav-height: 74px;
  --font:
    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

html[lang="ar"] {
  --font:
    "Noto Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: calc(var(--nav-height) + 22px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px / 1.75 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--gold-hover);
  outline-offset: 5px;
}
::selection {
  background: var(--gold);
  color: var(--bg);
}
[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 660;
  letter-spacing: -0.045em;
  line-height: 1.13;
}
html[lang="ar"] :is(h1, h2, h3) {
  letter-spacing: 0;
  line-height: 1.32;
}
p {
  color: var(--muted);
}
.container {
  width: min(var(--shell), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}
main:focus {
  outline: none;
}
.inline-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

.icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.icon-apple {
  fill: currentColor;
  stroke: none;
}
html[dir="rtl"] .icon-arrow {
  transform: scaleX(-1);
}
.skip-link {
  position: fixed;
  z-index: 80;
  inset: 12px auto auto 12px;
  padding: 8px 18px;
  background: var(--gold-hover);
  color: var(--bg);
  border-radius: 6px;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--nav-height);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  transition: background 0.22s ease;
}
.site-header.is-scrolled {
  background: rgb(11 13 16 / 0.9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.nav-shell {
  min-height: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(14px, 3vw, 40px);
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  width: fit-content;
  font-size: 23px;
  font-weight: 730;
  line-height: 1;
  color: var(--text);
}
.brand img {
  flex-shrink: 0;
  border-radius: 9px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(17px, 2.65vw, 36px);
}
.site-nav a,
.language-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 580;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a[aria-current="page"],
.language-link:hover {
  color: var(--text);
}
.site-nav .mobile-support {
  display: none;
}
.nav-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 19px;
}
.language-link {
  padding-inline: 3px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 49px;
  padding: 9px 18px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--gold);
  color: #171208;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.55;
  text-align: center;
  transition:
    color 0.2s,
    background-color 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.button:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  transform: translateY(-2px);
}
.button:active {
  transform: translateY(0);
}
.button-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.button-secondary:hover {
  background: var(--surface);
  border-color: #d6ad5280;
}
.button-secondary .icon {
  color: var(--gold);
}
.button.compact {
  min-height: 40px;
  padding-inline: 13px;
  font-size: 12px;
  white-space: nowrap;
}
.button.compact .icon {
  width: 14px;
  height: 14px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.menu-button {
  width: 44px;
  height: 44px;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
}
.menu-button span {
  width: 17px;
  height: 1px;
  background: var(--text);
  transition: transform 0.2s;
}
.menu-button[aria-expanded="true"] span:first-child {
  transform: translateY(3px) rotate(45deg);
}
.menu-button[aria-expanded="true"] span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 65px 24px;
  background: #0a0c0f;
}
.footer-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.18fr;
  gap: 32px;
  padding-bottom: 45px;
}
.footer-identity p {
  max-width: 240px;
  margin-top: 16px;
  font-size: 13px;
}
.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.footer-column p {
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 650;
  font-size: 13px;
}
.footer-column a {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.footer-column a:hover {
  color: var(--gold-hover);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 21px;
  color: var(--quiet);
  font-size: 11px;
}
.redirect-page {
  min-height: 75vh;
  display: grid;
  place-items: center;
  padding: 28px;
}
.redirect-card {
  max-width: 560px;
  text-align: center;
}
.redirect-card p {
  margin-block: 18px;
}

@media (max-width: 860px) {
  :root {
    --nav-height: 68px;
  }
  .nav-shell {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: wrap;
    gap: 0 22px;
  }
  .js .site-nav {
    display: none;
  }
  .js .site-nav[data-open="true"] {
    display: flex;
    position: absolute;
    inset: calc(var(--nav-height) - 1px) 0 auto;
    align-items: stretch;
    flex-direction: column;
    padding: 10px var(--gutter) 20px;
    border-bottom: 1px solid var(--line-strong);
    background: #11151a;
    box-shadow: 0 14px 30px #0004;
  }
  .js .site-nav[data-open="true"] a {
    min-height: 48px;
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav[data-open="true"] .mobile-support {
    display: flex;
  }
  .js .menu-button {
    display: flex;
  }
  .footer-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px;
  }
}

@media (max-width: 470px) {
  .nav-actions {
    gap: 10px;
  }
  .brand {
    gap: 6px;
    font-size: 19px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .language-link {
    font-size: 11px;
  }
  .button.compact {
    padding-inline: 8px;
    font-size: 10px;
  }
  .button.compact .icon {
    display: none;
  }
  .footer-layout {
    gap: 30px 20px;
  }
  .footer-identity {
    grid-column: 1 / -1;
  }
  .footer-column:last-child {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto !important;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }
  .site-header,
  .site-footer,
  .skip-link {
    display: none;
  }
  p {
    color: #222;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.18s;
  }
}

/* The sprout mark sits directly on the page with no tile behind it. */
.brand .brand-mark {
  border-radius: 0;
  background: none;
  object-fit: contain;
  filter: drop-shadow(0 0 10px #e8c87533);
  transition: filter .35s ease, transform .35s ease;
}
.brand:hover .brand-mark {
  filter: drop-shadow(0 0 14px #e8c87566);
  transform: rotate(-4deg) scale(1.04);
}
@media (prefers-reduced-motion: reduce) {
  .brand .brand-mark { transition: none; }
}

/* Soft cross-fade between pages (supported browsers), never a white flash. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out .32s cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root) { animation: page-in .5s cubic-bezier(.22,1,.36,1) both; }
@keyframes page-out { to { opacity: 0; filter: blur(4px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .01s; }
}
