/* motion tokens: see the skill's reference/motion.md before adding any animation */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --dir: 1;
}

[dir="rtl"] {
  --dir: -1;
}

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

body {
  margin: 0;
  font-family: var(--font-family);
  background: var(--background);
  color: #111;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.riyal { vertical-align: -0.12em; margin-inline-start: 0.2em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

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

.container {
  width: min(100% - 2.5rem, 72rem);
  margin-inline: auto;
}

.stack > * + * {
  margin-block-start: 1rem;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.center {
  text-align: center;
}

.site-footer {
  padding-block: 1.25rem;
}

.logo {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.hero {
  padding-block: 4rem;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  transition: transform 160ms var(--ease-out);
}

.button:active {
  transform: scale(0.97);
}

/* language menu */
.lang-menu {
  position: relative;
}

.lang-menu__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding-inline: 0.875rem;
  border: 1px solid rgb(0 0 0 / 0.15);
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.lang-menu__button::-webkit-details-marker {
  display: none;
}

.lang-menu__button:focus-visible,
.lang-menu__list a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.lang-menu__chevron {
  transition: transform 160ms var(--ease-out);
}

.lang-menu[open] .lang-menu__chevron {
  transform: rotate(180deg);
}

.lang-menu__list {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + 0.5rem);
  z-index: 20;
  min-width: 11rem;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  background: var(--background);
  border: 1px solid rgb(0 0 0 / 0.12);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
}

.lang-menu__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding-inline: 0.75rem;
  border-radius: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.lang-menu__list a:hover,
.lang-menu__list a[aria-current] {
  background: rgb(0 0 0 / 0.06);
}

@media (prefers-reduced-motion: reduce) {
  .lang-menu__chevron {
    transition: none;
  }
}

.logo img {
  display: block;
  height: 40px;
  width: auto;
}

/* extra site languages */
html[data-pending] body { visibility: hidden; }
.lang-menu__list { max-height: min(70dvh, 28rem); overflow-y: auto; overscroll-behavior: contain; }
.lang-menu__more { list-style: none; margin: 0; padding: 0; }
.lang-menu__more > ul { list-style: none; margin: 0; padding: 0; }
.lang-menu__more > ul:not(:empty) { border-top: 1px solid rgb(0 0 0 / 0.1); margin-top: 0.375rem; padding-top: 0.375rem; }
