/* 1. Базове скидання (Reset) */
*,
*::before,
*::after {
  box-sizing: border-box; /* Щоб padding та border не впливали на ширину елемента */
  margin: 0;
  padding: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}
ul,
ol {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
}
input,
button,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: transparent;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter_Regular.woff2") format("woff2"),
    url("../fonts/Inter_Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter_Medium.woff2") format("woff2"),
    url("../fonts/Inter_Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Bold.woff2") format("woff2"),
    url("../fonts/Inter-Bold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
:root {
  --container-padding: 16px;
  --container-width: 1280px;
  --container-small-width: 800px;
  --container-article-width: 995px;
  --container-min-width: 320px;

  --fontFamily: "Inter", Helvetica, Arial, sans-serif;
  --font-size: 16px;

  --accent-color: hsla(221, 97%, 54%, 1);
  --text-color: hsl(211 55% 85% / 1);

  --bg-base: hsla(0, 0%, 0%, 1);

  --bg-light: hsl(211 55% 92% / 1);
  --bg-dark: hsl(211 55% 26% / 1);

  --bg1: #326dab;
  --bg2: hsl(211 55% 56% / 1);
  --bg3: #3d83ce;

  --c-first: var(--text-color);

  accent-color: var(--accent-color);
}

html {
  scroll-behavior: smooth;
  box-sizing: border-box;
  height: -webkit-fill-available;
  overflow-x: hidden;
  --section-padding-normal: 45px;
  --section-padding-small: 40px;
  --section-padding-big: 120px;
}

body {
  text-rendering: optimizeSpeed;
  min-height: 100vh;
  font-family: "Inter", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  background-color: var(--bg-base);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
}

::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
}

body,
.wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
.wrapper {
  scroll-behavior: smooth;
  height: 100%;
}
.main {
  flex: 1;
}
.container,
[class*="__container"]:not(.fancybox__container) {
  max-width: calc(var(--container-width) + (var(--container-padding) * 2));
  width: 100%;
  padding-left: max(var(--container-padding));
  padding-right: max(var(--container-padding));
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   BASE MENU
========================= */

.menu {
  --menu-color: hsla(218, 14%, 84%, 1);
  font-family: var(--fontFamily);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.31px;
  color: var(--menu-color);
}

.menu__list svg {
  width: 12px;
  height: 8px;
}

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

.menu li {
  white-space: nowrap;
}

.menu a {
  font-weight: 500;
  transition: color 0.3s ease;
}

.menu a:hover {
  color: var(--accent-color);
}

/* =========================
   MAIN LIST
========================= */

ul.menu__list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px 40px;
}

ul.menu__list > li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

/* =========================
   SUBMENU — DESKTOP
========================= */

.current-menu-parent > a,
.current-menu-ancestor > a,
.current-menu-item > a {
  color: var(--accent-color);
}

@media (min-width: 1200px) {
  /* Base submenu */
  ul.menu__list ul {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;

    display: flex;
    flex-direction: column;
    gap: 8px;

    min-width: 260px;
    padding: 12px 0;

    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    z-index: 10;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);

    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

  /* Show submenu */
  ul.menu__list li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* Submenu items */
  ul.menu__list ul li {
    width: 100%;

    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  ul.menu__list ul a {
    padding: 8px 20px;
    line-height: 1.4;
    white-space: normal;
    display: block;
    transition: background-color 0.25s ease, color 0.25s ease;
  }

  ul.menu__list ul a:hover {
    background-color: #ebeef1;
    color: var(--accent-color);
  }

  /* Second level */
  ul.menu__list ul ul {
    top: 0;
    left: calc(100% + 8px);
    transform: translateX(10px);
  }

  ul.menu__list ul li:hover > ul {
    transform: translateX(0);
  }

  /* Arrow animation */
  .menu__item--arrow {
    transition: transform 0.25s ease;
  }

  li:hover > .menu__item--arrow {
    transform: rotate(180deg);
  }

  ul.menu__list ul .menu__item--arrow {
    transform: rotate(-90deg);
  }
}

/* =========================
   MOBILE MENU
========================= */
@media (max-width: 1199px) {
  .menu li {
    white-space: normal;
  }
  ul.menu__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  ul.menu__list > li {
    border-bottom: 1px solid #d9d9d9;
    line-height: 38px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .menu__body {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-base);
    padding: 60px var(--container-padding) 30px var(--container-padding);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
  }

  .menuopen .menu__body {
    transform: translateX(0);
  }

  .menu__item--children {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .menu__item--arrow {
    width: 40px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
  }

  /* Сабменю приховані */
  ul.menu__list ul {
    display: none;
    width: 100%;
    padding-left: 0;
    margin: 0;
    box-shadow: none;
    transform: none;
  }

  /* Відкрите сабменю — виправлено */
  li.is-open ul {
    display: block;
  }

  /* Поворот стрілки */
  li.is-open > .menu__item--arrow {
    transform: rotate(180deg);
  }

  /* Відступи для вкладених пунктів */
  ul.menu__list ul a {
    display: block;
    padding: 10px 20px;
    padding-left: 30px;
  }

  ul.menu__list ul ul a {
    padding-left: 45px;
  }
}

/* =========================
   BURGER
========================= */

.burger {
  width: 24px;
  height: 18px;
  position: relative;
  z-index: 99999;
}

@media (min-width: 1199px) {
  .burger {
    display: none;
  }
}

.burger span {
  position: absolute;
  right: 0;
  width: 100%;
  height: 2px;
  top: 7.5px;
  background-color: #fff;
  transition: transform 0.3s ease;
}

.burger::before,
.burger::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: #fff;
  left: 0;
  transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

.burger::before {
  top: 0;
}

.burger::after {
  bottom: 0;
}

.burger--active span {
  transform: scale(0);
}

.burger--active::before {
  transform: rotate(45deg);
  top: 6px;
}

.burger--active::after {
  transform: rotate(-45deg);
  bottom: 9px;
}
/* End Menu */

/* Header */
.main {
  margin-top: 85px;
}
.header {
  padding: 20px 0;
  border-bottom: 1px solid hsla(216, 31%, 17%, 1);
  background-color: var(--bg-base);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 3;
}
.header__container {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

/* buttons */
.btn {
  --btn-padding: 13px 24px;
  --btn-gap: 0.5em;
  --btn-bg: var(--accent-color);
  --btn-hover-bg: var(--accent-color);
  --btn-color: #ffffff;
  --btn-hover-color: var(--text-color);
  --btn-border-width: 1px;
  --btn-border-style: solid;
  --btn-border-color: var(--accent-color);
  --btn-hover-border-color: var(--btn-hover-bg);
  --btn-radius: 10px;
  --btn-font-weight: 500;
  --btn-font-size: 16px;
  --btn-font-family: var(--fontFamily);
  --btn-svg-size: 0.8em;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--btn-gap);
  padding: var(--btn-padding);

  border-width: var(--btn-border-width);
  border-style: var(--btn-border-style);
  border-color: var(--btn-border-color);
  border-radius: var(--btn-radius);

  text-align: center;
  text-decoration: none;
  font-weight: var(--btn-font-weight, 400);
  font-size: var(--btn-font-size, 16px);
  font-family: var(--btn-font-family);
  line-height: 1;

  color: var(--btn-color);
  background-color: var(--btn-bg);

  cursor: pointer;
  user-select: none;

  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, scale 0.3s ease;
}
.btn:hover {
  color: var(--btn-hover-color);
  background-color: var(--btn-hover-bg);
  border-color: var(--btn-hover-border-color);
  scale: 101%;
}
.btn:focus {
  outline: none;
}
.btn:focus-visible {
  outline: 2px dotted var(--btn-bg);
  outline-offset: 2px;
}
.btn:active {
  scale: 98%;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--border {
  --btn-bg: transparent;
}

/*form */
._dialog {
  background: linear-gradient(135deg, #101828 0%, #000000 100%);
  border: 1px solid #1e2939;
  border-radius: 24px;
  padding: 20px;
}
._dialog__body {
  padding: 20px;
  position: relative;
}
._dialog__close {
  display: block;
  width: 20px;
  height: 20px;
  margin-left: auto;
  cursor: pointer;
  position: relative;
  overflow: hidden;

  position: absolute;
  top: 20px;
  right: 20px;
  transition: transform 0.3s ease-in-out;
}
._dialog__close:before,
._dialog__close:after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  position: absolute;
  top: 50%;
  left: 0;
  background: hsla(0, 0%, 100%, 1);
}
._dialog__close:before {
  transform: rotate(45deg);
}
._dialog__close:after {
  transform: rotate(-45deg);
}
._dialog__close:hover {
  transform: rotate(360deg);
}

input[type="text"],
input[type="email"],
input[type="checkbox"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
  display: block;
  width: 100%;
  border-top: none;
  border-left: none;
  border-right: none;
  padding: clamp(16px, 1.404vw, 20px) clamp(20px, 1.685vw, 24px);

  background: #000000;
  border: 2px solid #1e2939;
  border-radius: 14px;

  font-family: var(--fontFamily);
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  color: hsla(0, 0%, 100%, 1);

  margin-top: 6px;
}
::placeholder,
dialog input::placeholder {
  color: hsla(0, 0%, 100%, 0.5);
}
textarea {
  height: 100px;
}
input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="number"]:focus-visible,
input[type="tel"]:focus-visible,
input[type="date"]:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--accent-color);
}
textarea[name="info"] {
  display: none;
  user-select: none;
}
/* Сховати стандартний чекбокс */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-block;
  margin: 0 10px 0 0;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
  background-color: #fff;
  transition: background-color 0.2s, border-color 0.2s;
}

/* Ховер / фокус */
input[type="checkbox"]:hover {
  border-color: var(--accent-color);
}

/* Галочка */
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 7px;
  width: 6px;
  height: 12px;
  border: solid var(--accent-color);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

label {
  font-family: var(--fontFamily);
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;

  color: #0f172a;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: hsla(0, 0%, 100%, 1);
}
form label {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.31px;
  color: #99a1af;
}
form button {
  margin-top: 10px;
  align-self: center;
}

._dialog {
  margin: auto;
  max-width: 552px;
  width: 90%;
}
._dialog__body {
  padding: 35px 38px 42px 38px;
}
._dialog-form__title {
  font-weight: 700;
  font-size: 26px;
  line-height: 31px;
  text-align: center;
  letter-spacing: 0.1px;
  margin-bottom: 10px;
}
._dialog-form__description {
  font-weight: 400;
  font-size: 14px;
  line-height: 156%;
  letter-spacing: 0.3px;
  margin-bottom: 20px;
}

/***********************/
.section-padding {
  --sp: clamp(60px, 7.865vw, 112px);
  padding-top: var(--sp);
  padding-bottom: var(--sp);
}
.section-gradient {
  background: linear-gradient(180deg, #000000 0%, #101828 100%);
}
[class*="__heading"] {
  max-width: 820px;
  text-align: center;
  margin: 0 auto clamp(30px, 5.618vw, 80px) auto;
}
.sectionSuptitle {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.48px;
  color: var(--accent-color);
  margin-bottom: 18px;
}
.h2title {
  font-weight: 700;
  font-size: clamp(
    40px,
    40px + (60 - 40) * ((100vw - 320px) / (1424 - 320)),
    60px
  );
  line-height: 1;
  letter-spacing: 0.26px;
  color: #ffffff;
  margin-bottom: clamp(20px, 1.685vw, 24px);
}
.sectionDescription {
  font-weight: 400;
  font-size: clamp(18px, 1.404vw, 20px);
  line-height: 140%;
  letter-spacing: -0.44px;
  color: #99a1af;
}
.sectionButtons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 64px;
}

.item-title {
  font-weight: 700;
  font-size: 24px;
  line-height: 133%;
  letter-spacing: 0.07px;
  color: #ffffff;
  margin-bottom: 16px;
}
.item-description {
  font-weight: 400;
  font-size: 16px;
  line-height: 162%;
  letter-spacing: -0.31px;
  color: #99a1af;
}
/***********************/

/* hero */
.hero {
  background: linear-gradient(135deg, #000000 0%, #101828 50%, #000000 100%);
}
.hero__container {
  padding-top: 44px;
  padding-bottom: clamp(44px, 5.618vw, 80px);
}
.hero h1 {
  font-weight: 700;
  font-size: clamp(
    50px,
    50px + (96 - 50) * ((100vw - 320px) / (1424 - 320)),
    96px
  );
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: clamp(20px, 2.107vw, 30px);
}
.hero h1 mark {
  color: var(--accent-color);
  background-color: transparent;
  display: block;
}
.hero__description {
  font-weight: 400;
  font-size: clamp(18px, 1.404vw, 20px);
  line-height: 1.6;
  letter-spacing: -0.4px;
  color: #99a1af;
  margin-bottom: clamp(20px, 2.107vw, 30px);
}
.hero__sup {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.15px;
  color: #51a2ff;
  text-align: center;

  background: rgba(21, 93, 252, 0.1);
  border: 1px solid rgba(21, 93, 252, 0.3);
  border-radius: 1.67772e7px;
  max-width: 212px;
  padding: 10px 20px;
  margin-bottom: clamp(20px, 2.247vw, 32px);
}
.hero__wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}
.hero__content {
  flex: 1;
}
.hero__info {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.247vw, 32px);
}
.hero__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(20px, 2.388vw, 34px);
  gap: clamp(16px, 1.685vw, 24px);

  background: #101828;
  border: 1px solid #1e2939;
  border-radius: 16px;
}
.hero__value {
  font-weight: 700;
  font-size: clamp(
    30px,
    30px + (48 - 30) * ((100vw - 320px) / (1424 - 320)),
    48px
  );
  line-height: 1;
  letter-spacing: 0.35px;
  color: var(--accent-color);
}
.hero__label {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.3;
  color: #99a1af;
}
.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.hero__buttons .btn {
  --btn-padding: clamp(18px, 1.545vw, 22px) clamp(30px, 2.809vw, 40px);
  --btn-font-weight: 600;
  --btn-font-size: clamp(16px, 1.264vw, 18px);
  letter-spacing: -0.44px;
}

.services__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 24px;
}
.services__item {
  flex: 1;
  background: #101828;
  border: 1px solid #1e2939;
  border-radius: 16px;
  padding: clamp(20px, 2.809vw, 40px);
  max-width: 302px;
  min-width: 200px;
}
.services__item-icon {
  --ic-w: clamp(44px, 5.618vw, 80px);
  width: var(--ic-w);
  height: var(--ic-w);
  margin-bottom: clamp(18px, 2.247vw, 32px);

  background: rgba(21, 93, 252, 0.1);
  border-radius: 16px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.why__items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}
.why__item {
  background: linear-gradient(135deg, #101828 0%, #000000 100%);
  border: 1px solid #1e2939;
  border-radius: 16px;

  padding: clamp(20px, 2.809vw, 40px);
}
.why__item-icon {
  --ic-w: clamp(44px, 4.494vw, 64px);
  width: var(--ic-w);
  height: var(--ic-w);
  margin-bottom: clamp(18px, 1.685vw, 24px);

  background: rgba(21, 93, 252, 0.1);
  border-radius: 16px;

  display: flex;
  align-items: center;
  justify-content: center;
}
.portfolio__items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(16px, 2.247vw, 32px);
}
.portfolio__item {
  background: linear-gradient(135deg, #155dfc 0%, #193cb8 100%);
  border-radius: 16px;
  padding: clamp(20px, 2.809vw, 40px);
  aspect-ratio: 1/1;

  position: relative;
  display: flex;
  align-items: end;
  overflow: hidden;
}
.portfolio__item:before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000000db 20%, #ffffff00);
  transition: opacity 0.3s ease-in-out;
}
.portfolio__item-content {
  position: relative;
  z-index: 1;

  transition: transform 0.3s ease-in-out;
}
.portfolio__item:hover .portfolio__item-content {
  transform: translate3d(0, 200%, 0);
}
.portfolio__item:hover:before {
  opacity: 0;
}
.portfolio__item-title {
  margin-bottom: 8px;
}
.portfolio__item-description {
  color: hsla(211, 100%, 78%, 1);
}

.contact__wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 64px;
}
.contact__form {
  flex: 1;
  background: linear-gradient(135deg, #101828 0%, #000000 100%);
  border: 1px solid #1e2939;
  border-radius: 24px;
  padding: clamp(30px, 2.809vw, 40px) clamp(20px, 2.809vw, 40px);
}
.contact__information {
  flex: 1;
}
.contact__info-title {
}
.contact__info-description {
  font-size: 18px;
  line-height: 162%;
  letter-spacing: -0.439453px;

  color: #99a1af;

  margin-bottom: 40px;
}
.contact__information-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.contact__information-item {
  background: linear-gradient(135deg, #101828 0%, #000000 100%);
  border: 1px solid #1e2939;
  border-radius: 16px;
  padding: clamp(20px, 2.247vw, 32px);

  display: flex;
  gap: clamp(10px, 1.685vw, 24px);
}
.contact__information-icon {
  --ciw: clamp(30px, 4.494vw, 64px);
  flex: 0 0 var(--ciw);
  width: var(--ciw);
  height: var(--ciw);
  background: rgba(21, 93, 252, 0.1);
  border-radius: 14px;

  display: flex;
  align-items: center;
  justify-content: center;
}
.contact__information-wrapper {
}
.contact__information-title {
  font-weight: 700;
  font-size: 20px;
  line-height: 140%;
  letter-spacing: -0.44px;
  color: #ffffff;
  margin-bottom: 8px;
}
.contact__information-link {
  font-weight: 400;
  font-size: 18px;
  line-height: 156%;
  letter-spacing: -0.43px;
  color: #99a1af;
  display: block;
  transition: color 0.3s ease-in-out;
}
.contact__information-link:hover {
  color: hsla(0, 0%, 100%, 1);
}
.contact button {
  --btn-padding: clamp(18px, 1.545vw, 22px) clamp(30px, 2.809vw, 40px);
  --btn-font-weight: 600;
  --btn-font-size: clamp(16px, 1.264vw, 18px);
  letter-spacing: -0.44px;
  width: 100%;
}

@media (max-width: 767px) {
  ._dialog__body {
    padding: 50px 0 0 0;
  }
}
