@font-face {
  font-family: Tajawal;
  src: url("./Tajawal.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Montserrat;
  src: url("./Montserrat.woff") format("woff");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: Tajawal, sans-serif;
  color: #171717;
  background: #fff;
  --line: #e9e7e2;
  --footer-space: calc(72px + env(safe-area-inset-bottom, 0px));
}

:lang(en) { font-family: Montserrat, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
:lang(en):is(button) { font-family: Montserrat, sans-serif; }
:focus-visible { outline: 2px solid #56534b; outline-offset: 3px; }
[hidden] { display: none !important; }

.desktop {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.desktop-qr {
  display: grid;
  justify-items: center;
  margin: 0;
  text-align: center;
}

.desktop-phone {
  position: relative;
  display: block;
  width: 32px;
  height: 52px;
  margin-block-end: 10px;
  border: 2px solid #302e29;
  border-radius: 7px;
}

.desktop-phone::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 5px;
  width: 10px;
  height: 2px;
  margin-inline: auto;
  border-radius: 1px;
  background: #302e29;
}

.desktop-qr img {
  display: block;
  width: min(198px, 100%, 45vh);
  height: auto;
  image-rendering: pixelated;
}

.desktop-qr figcaption {
  margin-block-start: 12px;
  color: #24221f;
  font-size: 1.5625rem;
  line-height: 1.4;
}

.desktop-qr bdi {
  font-size: 1.25rem;
  font-weight: 500;
}

.mobile { display: none; }
html[data-handheld] .desktop { display: none; }
html[data-handheld] .mobile { display: block; }

@media (hover: none) and (pointer: coarse) {
  .desktop { display: none; }
  .mobile { display: block; }
}

.page {
  min-height: calc(100dvh - var(--footer-space));
  margin-block-end: var(--footer-space);
}

.site-footer {
  position: fixed;
  z-index: 1;
  inset: auto 0 0;
  min-height: var(--footer-space);
  padding: 10px max(12px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border-block-start: 1px solid var(--line);
  background: #fff;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: .875rem;
  line-height: 1.45;
}

.site-footer bdi { font-size: .78rem; white-space: nowrap; }
.copyright-year { margin-inline-start: .2em; }

.designer {
  display: inline-flex;
  align-items: center;
  gap: .25em;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  font-size: .875rem;
}

.designer span {
  text-decoration: underline;
  text-decoration-color: #aca79e;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.about {
  position: fixed;
  inset: 0;
  width: min(100% - 28px, 430px);
  max-height: calc(100dvh - max(28px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 20px));
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 24px;
  color: inherit;
  background: #fff;
  box-shadow: 0 18px 60px #1918152b;
}

.about::backdrop {
  background: #201f1c57;
  backdrop-filter: blur(3px);
}

.about-body {
  max-height: inherit;
  padding: 19px;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: inherit;
}

.about-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-block-end: 13px;
  border-block-end: 1px solid var(--line);
}

.about-header h1 { margin: 0; font-size: 1.27rem; font-weight: 400; }
.about-header bdi { font-size: 1.05rem; font-weight: 600; }

.close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
}

.close:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.description { margin: 17px 0 15px; font-size: 1rem; }

.profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf9f7;
}

.profile-details { display: grid; gap: 4px; }
.profile-name { font-size: 1rem; }
.profile-role { font-size: .875rem; color: #4e4b46; }

.telegram {
  display: inline-flex;
  direction: ltr;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding-inline: 9px;
  border-radius: 999px;
  color: #fff;
  background: #007caf;
  font-size: .72rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.telegram-icon {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
}

.telegram-icon::before {
  content: "";
  width: 10px;
  height: 10px;
  background: #007caf;
  clip-path: polygon(5% 44%, 94% 9%, 75% 94%, 47% 70%, 37% 81%, 40% 55%, 76% 29%, 31% 51%);
}

.credentials { margin-block-start: 19px; }
.credentials h2 { margin: 0 0 9px; font-size: .9375rem; font-weight: 400; }

.credential-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.credential-grid button {
  min-width: 0;
  min-height: 44px;
  padding: 3px 2px;
  border: 1px solid #e4e1da;
  border-radius: 11px;
  background: #fff;
  font-size: clamp(.625rem, 2.8vw, .82rem);
  font-weight: 600;
  white-space: nowrap;
}

.credential-grid button[aria-expanded="true"] {
  border-color: #79746b;
  background: #f5f3ef;
}

.credential-description {
  position: fixed;
  z-index: 1;
  width: max-content;
  max-width: min(254px, calc(100vw - 28px));
  padding: 10px 12px;
  border-radius: 10px;
  color: #fff;
  background: #151515;
  box-shadow: 0 6px 20px #0003;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
}

.credential-description::after {
  content: "";
  position: absolute;
  left: var(--tip-anchor);
  top: 100%;
  translate: -50% 0;
  border: 5px solid transparent;
  border-top-color: #151515;
}

.credential-description span { display: block; }
.credential-description span:lang(ar) { margin-block-start: 3px; font-size: .85rem; font-weight: 400; }
