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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  direction: rtl;
  min-height: 100vh;
  font-family: var(--font-family);
  font-size: var(--body);
  line-height: 1.7;
  color: var(--text-primary);
  background:
    linear-gradient(135deg, rgba(63, 13, 36, 0.98), rgba(90, 22, 57, 0.96)),
    var(--bg-primary);
  text-rendering: optimizeLegibility;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: var(--h1);
  line-height: 1.18;
  font-weight: var(--font-weight-bold);
}

h2 {
  font-size: var(--h2);
  line-height: 1.25;
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: var(--h3);
  line-height: 1.3;
  font-weight: var(--font-weight-bold);
}

h4 {
  font-size: var(--h4);
  line-height: 1.35;
  font-weight: var(--font-weight-semibold);
}

:focus-visible {
  outline: 3px solid var(--accent-pink);
  outline-offset: 3px;
}

::selection {
  color: var(--primary-dark);
  background: var(--accent-pink);
}
