/* Базовые стили и сброс */

/* CSS Reset */
*, *::before, *::after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, img, ins, kbd, q, s, samp,
small, strike, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

xmp {
  margin: 0;
  padding: 0;
  text-align: left;
  text-indent: inherit;
  float: none;
  white-space: normal;
  font-style: italic;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, main {
  display: block;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Базовые стили */
input:focus {outline: none;}
a, button, input, textarea, div, span {
  outline: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-tap-highlight-color: transparent;
}

a {
  -webkit-transition: var(--transition-normal) all;
  -moz-transition: var(--transition-normal) all;
  -o-transition: var(--transition-normal) all;
  transition: var(--transition-normal) all;
  text-decoration: none;
}

/* Scrollbar styles */
::-webkit-scrollbar-button {width: 6px; height: 4px;}
::-webkit-scrollbar-track {background: var(--secondary-color);}
::-webkit-scrollbar-thumb {-webkit-border-radius: 2px; border-radius: 2px; background: var(--primary-color);}
::-webkit-scrollbar-thumb:hover {background: #333;}
::-webkit-resizer {width: 8px; height: 4px;}
::-webkit-scrollbar {width: 8px;}

/* Общие стили */
body {
  font-family: 'Onest-Light', sans-serif;
  line-height: 1;
  color: var(--font-color);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body img {
  max-width: 100%;
  display: block;
  margin: 0;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Onest-Regular', sans-serif;
}

h3, .single-portfolio h1 {
  font-family: 'Onest-Regular';
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: clamp(1.5rem, 4vw, 4.375rem);
  text-transform: uppercase;
}

p {
  margin-bottom: clamp(1rem, 2vw, 1.56rem);
  font-family: 'Onest-Light';
  font-size: clamp(0.9rem, 2vw, 0.94rem);
  line-height: 140%;
  letter-spacing: -0.05em;
}

p:last-child {
  margin-bottom: 0;
}

/* Общие классы */
.last-item{
  order: 1;
}
.first-item{
  order: -1;
}

/* Изображения */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Фокус для доступности */
a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
