/* ===== Noxegis — base variables ===== */
:root {
  --color-text-high: #edeff3;   /* текст вищого рівня */
  --color-text-low:  #9aa4b2;   /* текст нижчого рівня */
  --color-bg:        #0e1116;   /* фон сайту */
  --color-accent:    #39ff6a;   /* зелений — логотип, деталі */
  --header-height:   72px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-high);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

/* ===== Стільниковий фон із підсвіткою за курсором ===== */
:root {
  /* позиція курсора (оновлює JS); за замовч. за екраном — без підсвітки */
  --mx: -9999px;
  --my: -9999px;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

/* НИЖНІЙ шар: суцільна зелень, видима лише колом навколо курсора.
   Проявляється тільки крізь проміжки між плитками (плитки зверху). */
body::before {
  z-index: -2;
  background-color: var(--color-accent);
  filter: drop-shadow(0 0 5px rgba(57, 255, 106, 0.7));
  -webkit-mask-image: radial-gradient(circle 165px at var(--mx) var(--my),
                       #000 25%, rgba(0, 0, 0, 0.55) 5%, transparent 75%);
          mask-image: radial-gradient(circle 165px at var(--mx) var(--my),
                       #000 25%, rgba(0, 0, 0, 0.55) 5%, transparent 75%);
}

/* ВЕРХНІЙ шар: суцільні темні плитки-шестикутники з проміжками.
   Проміжки прозорі → крізь них видно зелень (біля курсора) або фон. */
body::after {
  z-index: -1;
  background-repeat: repeat;
  background-size: 84px 48.5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='34.641' viewBox='0 0 60 34.641'%3E%3Cg fill='%230e1116'%3E%3Cpath d='M49 17.32L39.5 33.78L20.5 33.78L11 17.32L20.5 0.87L39.5 0.87Z'/%3E%3Cpath d='M19 0L9.5 16.45L-9.5 16.45L-19 0L-9.5 -16.45L9.5 -16.45Z'/%3E%3Cpath d='M19 34.64L9.5 51.1L-9.5 51.1L-19 34.64L-9.5 18.19L9.5 18.19Z'/%3E%3Cpath d='M79 0L69.5 16.45L50.5 16.45L41 0L50.5 -16.45L69.5 -16.45Z'/%3E%3Cpath d='M79 34.64L69.5 51.1L50.5 51.1L41 34.64L50.5 18.19L69.5 18.19Z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ===== Header ===== */
:root {
  --site-max: 1000px;   /* максимальна ширина сайту */
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);

  /* напівпрозорий фон з розмиттям об'єктів позаду (на всю ширину) */
  background-color: rgba(14, 17, 22, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(154, 164, 178, 0.12);
}

/* вміст хедера центрується в межах 1000px */
.site-header__inner {
  max-width: var(--site-max);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ---- Логотип + назва ---- */
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text-high);
}

.site-header__brand-logo {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.site-header__brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ---- Навігація ---- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--color-text-low);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

/* активність при наведенні */
.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--color-text-high);
  background-color: rgba(154, 164, 178, 0.10);
  outline: none;
}

.site-nav__link:active {
  transform: translateY(1px);
}

/* ---- Випадаючий список Services ---- */
.site-nav__item {
  position: relative;
}

.site-nav__caret {
  width: 10px;
  height: 10px;
  transition: transform 0.2s ease;
}

.site-nav__item:hover .site-nav__caret,
.site-nav__item:focus-within .site-nav__caret {
  transform: rotate(180deg);
}

.site-nav__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 230px;
  padding: 8px;
  list-style: none;
  background-color: rgba(14, 17, 22, 0.92);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(154, 164, 178, 0.14);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

/* невидимий "місток", щоб курсор не втрачав меню */
.site-nav__dropdown::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.site-nav__item:hover .site-nav__dropdown,
.site-nav__item:focus-within .site-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav__dropdown-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-text-low);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav__dropdown-link:hover,
.site-nav__dropdown-link:focus-visible {
  color: var(--color-text-high);
  background-color: rgba(57, 255, 106, 0.08);
  outline: none;
}

/* зелена крапочка 6x6 на початку кожного пункту */
.site-nav__dropdown-link::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
  box-shadow: 0 0 6px rgba(57, 255, 106, 0.7);
}

/* ---- Кнопка Contact us ---- */
.site-nav__cta {
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: 999px;
  padding: 9px 20px;
  background-color: transparent;
  margin-left: 8px;
}

.site-nav__cta:hover,
.site-nav__cta:focus-visible {
  color: var(--color-bg);
  background-color: var(--color-accent);
  box-shadow: 0 0 18px rgba(57, 255, 106, 0.45);
}

/* компенсація фіксованого хедера + ширина сайту 1000px */
.page-content {
  padding-top: var(--header-height);
  max-width: var(--site-max);
  margin: 0 auto;
}

/* ---- Бургер (прихований на десктопі) ---- */
.site-nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid rgba(154, 164, 178, 0.18);
  border-radius: 9px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-nav__burger:hover,
.site-nav__burger:focus-visible {
  background-color: rgba(154, 164, 178, 0.10);
  border-color: var(--color-accent);
  outline: none;
}

.site-nav__burger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background-color: var(--color-text-high);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* анімація у хрестик */
body.nav-open .site-nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .site-nav__burger span:nth-child(2) { opacity: 0; }
body.nav-open .site-nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav__overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.5);
}

/* ===== Мобільна версія ===== */
@media (max-width: 720px) {
  .site-nav__burger { display: flex; }

  /* висувне меню-панель */
  .site-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    z-index: 1001;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: min(78vw, 300px);
    height: calc(100vh - var(--header-height));
    padding: 18px;
    background-color: rgba(14, 17, 22, 0.96);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border-left: 1px solid rgba(154, 164, 178, 0.14);
    overflow-y: auto;

    transform: translateX(100%);
    transition: transform 0.28s ease;
  }

  body.nav-open .site-nav { transform: translateX(0); }

  .site-nav__link {
    padding: 13px 12px;
    font-size: 16px;
    border-radius: 8px;
  }

  .site-nav__item { width: 100%; }

  /* Підменю: інлайн-акордеон, згорнуте за замовчуванням */
  .site-nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    margin: 0 0 0 12px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-left: 1px solid rgba(154, 164, 178, 0.16);
    border-radius: 0;

    /* згорнуто */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
  }

  .site-nav__dropdown::before { content: none; }

  /* розгорнуто (клас додає JS по кліку) */
  .site-nav__item.is-open > .site-nav__dropdown {
    max-height: 520px;
    margin: 4px 0 6px 12px;
    padding: 4px;
  }

  /* каретка-індикатор згортання/розгортання */
  .site-nav__caret {
    display: block;
    width: 12px;
    height: 12px;
    margin-left: auto;
  }

  .site-nav__item.is-open > .site-nav__link .site-nav__caret {
    transform: rotate(180deg);
  }

  .site-nav__cta {
    margin: 8px 0 0;
    text-align: center;
    justify-content: center;
  }
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid rgba(154, 164, 178, 0.12);
  margin-top: 80px;
  scroll-margin-top: var(--header-height);
}

/* ===== Блоки-картки (Services / Training / Products) ===== */
.block-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.block-card {
  display: block;
  padding: 24px;
  border-radius: 14px;
  background-color: rgba(154, 164, 178, 0.06);
  border: 1px solid rgba(154, 164, 178, 0.14);
  color: var(--color-text-high);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
}

.block-card:hover,
.block-card:focus-visible {
  border-color: var(--color-accent);
  background-color: rgba(57, 255, 106, 0.06);
  transform: translateY(-2px);
  outline: none;
}

.block-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.block-card__desc {
  color: var(--color-text-low);
  font-size: 14px;
}

/* ===== Контактна форма ("Have an idea?") у футері ===== */
.contact {
  background-color: var(--color-bg);
  padding: 90px clamp(16px, 4vw, 48px) 60px;
}

.contact__inner {
  max-width: var(--site-max);
  margin: 0 auto;
}

.contact__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 48px;
}

.contact__title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.1;
}

.contact__subtitle {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  color: var(--color-text-high);
  margin-top: 4px;
}

.contact__heading {
  padding-left: clamp(0px, 2vw, 24px);
}

.contact__about {
  max-width: 400px;
  color: var(--color-text-low);
  font-size: 14px;
  line-height: 1.6;
  padding-right: clamp(0px, 2vw, 24px);
}

.contact__about strong {
  color: var(--color-text-high);
  letter-spacing: 0.5px;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.contact__field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact__field label {
  font-size: 13px;
  color: var(--color-text-low);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.contact__field input,
.contact__field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(154, 164, 178, 0.35);
  color: var(--color-text-high);
  font-size: 16px;
  font-family: inherit;
  padding: 6px 2px 10px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.contact__field input::placeholder,
.contact__field textarea::placeholder {
  color: var(--color-text-low);
}

.contact__field input:focus,
.contact__field textarea:focus {
  border-color: var(--color-accent);
}

.contact__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-text-low);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.contact__checkbox input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
  flex: 0 0 auto;
}

.contact__legal {
  color: var(--color-text-low);
  font-size: 13px;
  line-height: 1.6;
}

.contact__legal .contact__legal-link {
  color: var(--color-accent);
  text-decoration: underline;
}

.contact__submit-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.contact__submit {
  background-color: var(--color-accent);
  color: var(--color-bg);
  border: none;
  border-radius: 999px;
  padding: 13px 32px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

.contact__submit:hover {
  box-shadow: 0 0 18px rgba(57, 255, 106, 0.45);
}

.contact__submit:active {
  transform: translateY(1px);
}

.contact__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact__status {
  font-size: 14px;
}

.contact__status--ok {
  color: var(--color-accent);
}

.contact__status--error {
  color: #ff6b6b;
}

@media (max-width: 640px) {
  .contact__row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
