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

html {
  direction: rtl;
  scroll-behavior: smooth;
  font-family: var(--bamboo-font-family), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bamboo-bg);
  color: var(--bamboo-text);
  font-family: var(--bamboo-font-family), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--bamboo-font-size-base);
  font-synthesis: none;
  line-height: var(--bamboo-line-height);
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  font-family: var(--bamboo-font-family), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--bamboo-primary-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--bamboo-primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-block: 0 0.65em;
  color: var(--bamboo-text);
  line-height: 1.45;
}

h1 {
  font-size: var(--bamboo-font-heading-lg);
}

h2 {
  font-size: var(--bamboo-font-heading-md);
}

h3 {
  font-size: 14.5px;
}

h4,
h5,
h6 {
  font-size: 13.5px;
}

p {
  margin-block: 0 1em;
}

::selection {
  background: var(--bamboo-primary-dark);
  color: var(--bamboo-surface);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: var(--bamboo-space-4);
  right: var(--bamboo-space-4);
  width: auto;
  height: auto;
  padding: var(--bamboo-space-3) var(--bamboo-space-4);
  clip: auto;
  background: var(--bamboo-surface);
  border-radius: var(--bamboo-radius-sm);
}
