/* ==========================================================================
   Bridge Digital — Modules & Integrations
   Mobile-first. Брейкпоинты:
     < 768px      мобильный (макет 390px)
     ≥ 768px      планшет
     ≥ 1024px     десктоп
     ≥ 1200px     широкий десктоп (футер в одну строку)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #040809;
  --text: #ffffff;
  --text-soft: rgb(255 255 255 / 0.8);
  --accent: #1e54ec;
  --accent-light: #70a9ff;
  --line: rgb(255 255 255 / 0.16);
  --border: rgb(255 255 255 / 0.2);

  --font: "Google Sans Flex", Helvetica, Arial, sans-serif;

  --container: 1216px;
  --gutter: 16px;

  --fs-xl: 40px; /* h1 и заголовок CTA */
  --fs-lg: 40px; /* заголовок списка */
  --fs-item: 24px;

  --glass-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.4),
    inset 1px 0 0 rgb(255 255 255 / 0.32),
    inset 0 -1px 5px rgb(0 0 0 / 0.2),
    inset -1px 0 5px rgb(0 0 0 / 0.16);
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --fs-xl: 52px;
    --fs-lg: 44px;
    --fs-item: 22px;
  }
}

@media (min-width: 1024px) {
  :root {
    --fs-xl: 64px;
    --fs-lg: 56px;
    --fs-item: 24px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

address {
  font-style: normal;
}

:focus-visible {
  outline: 2px solid #4a90e2;
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
}

/* ---------- Page & background glows ---------- */
.page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-bottom: 16px;
}

.glow {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    175deg,
    rgb(0 0 0 / 0) 0%,
    rgb(0 0 0 / 0) 46%,
    rgb(30 84 236 / 0.69) 66%,
    rgb(112 169 255 / 1) 78%,
    rgb(30 84 236 / 0.43) 100%
  );
  filter: blur(52px);
}

/* Свечение в левом верхнем углу */
.glow--top {
  top: -70px;
  left: -300px;
  width: 640px;
  height: 220px;
  border-radius: 320px / 110px;
  transform: rotate(-163.71deg);
}

/* Свечение справа за изображением (мобильный) */
.glow--right {
  top: -210px;
  left: calc(100% - 340px);
  width: 860px;
  height: 900px;
  border-radius: 50%;
  opacity: 0.9;
}

@media (min-width: 768px) {
  .glow--top {
    top: -40px;
    left: -400px;
    width: 1000px;
    height: 260px;
    border-radius: 500px / 130px;
  }

  .glow--right {
    opacity: 1;
    top: 120px;
    left: calc(50% - 300px);
    width: 1100px;
    height: 560px;
    border-radius: 550px / 280px;
  }
}

@media (min-width: 1024px) {
  .glow--top {
    top: -16px;
    left: -512px;
    width: 1400px;
    height: 280px;
    border-radius: 700px / 140px;
  }

  .glow--right {
    top: 255px;
    left: calc(50% - 174px);
    width: 1400px;
    height: 613px;
    border-radius: 700px / 306.7px;
  }
}

/* ---------- Glass surface ---------- */
.glass {
  background-color: rgb(255 255 255 / 0.05);
  border: 0.5px solid var(--border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(13px) saturate(91.2%);
  backdrop-filter: blur(13px) saturate(91.2%);
}

/* ---------- Typography ---------- */
.heading {
  padding-bottom: 0.1em; /* чтобы не обрезались нижние выносные элементы (g, p, y) */
  margin-bottom: -0.1em;
  background: linear-gradient(199deg, var(--accent-light) 0%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.heading--xl {
  font-size: var(--fs-xl);
}

.heading--lg {
  font-size: var(--fs-lg);
}

.lead {
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.4;
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 10;
  padding-top: 14px;
}

.navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px 16px;
  border-radius: 56px;
}

.navbar__logo img {
  width: 164px;
  height: 24px;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar__nav a,
.footer__nav a,
.footer__contacts a,
.lang a {
  color: var(--text-soft);
  transition: color 0.2s ease;
}

.navbar__nav a:hover,
.footer__nav a:hover,
.footer__contacts a:hover,
.lang a:hover {
  color: var(--text);
}

.lang {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang a[aria-current] {
  font-weight: 700;
}

/* Burger (виден только при включённом JS и < 768px) */
.burger {
  display: none;
}

@media (max-width: 767.98px) {
  .js .burger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    margin-right: -8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    cursor: pointer;
  }

  .burger__bar {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s ease;
  }

  .navbar.is-open .burger__bar:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .navbar.is-open .burger__bar:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  /* Выпадающее меню. Без JS показывается обычным блоком под логотипом. */
  .navbar {
    flex-wrap: wrap;
  }

  .navbar__panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 16px 0 8px;
  }

  .navbar__nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .navbar__nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 18px;
  }

  .js .navbar__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    padding: 8px 24px 20px;
    border: 0.5px solid var(--border);
    border-radius: 24px;
    background: rgb(8 14 28 / 0.99);
    box-shadow: var(--glass-shadow), 0 24px 48px rgb(0 0 0 / 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      visibility 0s linear 0.2s;
  }

  .js .navbar.is-open .navbar__panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }
}

@media (min-width: 768px) {
  .navbar {
    padding: 8px 24px;
  }

  /* logo | nav | lang — как в десктопном макете (space-between) */
  .navbar__panel {
    display: contents;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 40px;
}

.hero__inner {
  display: grid;
  gap: 40px;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero__text .lead {
  max-width: 520px;
}

.hero__visual {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .hero {
    padding-top: 56px;
  }

  .hero__inner {
    gap: 48px;
  }

  .hero__text .lead {
    max-width: 560px;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding-top: 30px;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 520px) minmax(0, 520px);
    justify-content: space-between;
    align-items: start;
    gap: 32px;
  }

  .hero__text {
    padding-top: 116px;
  }

  .hero__visual {
    margin-inline: 0;
  }
}

/* ---------- Modules list ---------- */
.modules {
  margin-top: 104px;
}

.modules .container {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.modules__lists {
  display: grid;
  gap: 0;
}

.modules__list li {
  border-bottom: 1px solid var(--line);
}

.modules__list a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  font-size: var(--fs-item);
  font-weight: 500;
  line-height: 1.2;
}

.modules__list li:first-child a {
  padding-top: 0;
}

/* Мобильный: два списка идут подряд как один — у первой строки второго нужен верхний отступ */
.modules__list + .modules__list li:first-child a {
  padding-top: 16px;
}

.modules__num {
  flex: none;
  min-width: 2ch;
  font-variant-numeric: tabular-nums;
}

.modules__name {
  flex: 1;
  min-width: 0;
}

.modules__list img {
  flex: none;
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}

.modules__list a:hover img,
.modules__list a:focus-visible img {
  transform: translate(3px, -3px);
}

@media (min-width: 768px) {
  .modules {
    margin-top: 88px;
  }

  .modules__lists {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    column-gap: 32px;
  }

  .modules__list + .modules__list li:first-child a {
    padding-top: 0;
  }
}

@media (min-width: 1024px) {
  .modules {
    margin-top: 29px;
  }

  .modules .heading {
    max-width: 677px;
  }
}

/* ---------- CTA ---------- */
.cta {
  margin-top: 128px;
}

.cta__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 32px 16px;
  border: 0.5px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(13px) saturate(91.2%);
  backdrop-filter: blur(13px) saturate(91.2%);
  background:
    radial-gradient(
      100% 48% at 0% 14%,
      rgb(42 96 239 / 0.85) 0%,
      rgb(30 84 236 / 0.4) 40%,
      rgb(0 0 0 / 0) 100%
    ),
    radial-gradient(
      70% 40% at 105% 60%,
      rgb(30 84 236 / 0.35) 0%,
      rgb(0 0 0 / 0) 100%
    ),
    linear-gradient(234deg, rgb(112 169 255 / 0.1) 0%, rgb(255 255 255 / 0.05) 100%);
}

.cta__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 884px;
  text-align: center;
}

.cta__text {
  max-width: 630px;
}

/* Карточка с контактом */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  padding: 32px 16px;
  border: 0.5px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(13px) saturate(91.2%);
  backdrop-filter: blur(13px) saturate(91.2%);
  background:
    radial-gradient(
      70% 60% at 85% 105%,
      rgb(112 169 255 / 1) 0%,
      rgb(30 84 236 / 0.69) 45%,
      rgb(0 0 0 / 0) 100%
    ),
    radial-gradient(
      90% 60% at 0% 0%,
      rgb(42 96 239 / 0.5) 0%,
      rgb(0 0 0 / 0) 100%
    ),
    linear-gradient(234deg, rgb(112 169 255 / 0.02) 0%, rgb(255 255 255 / 0.01) 100%);
}

.contact-card__person {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 4px;
}

.contact-card__person img {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.contact-card__name {
  color: var(--text);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
}

.contact-card__role {
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.4;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: 8px 16px;
  border-radius: 48px;
  background-color: var(--accent);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: filter 0.2s ease;
}

.button:hover {
  filter: brightness(1.15);
}

@media (min-width: 768px) {
  .cta {
    margin-top: 96px;
  }

  .cta__content {
    gap: 24px;
  }

  .cta__card {
    gap: 40px;
    padding: 64px 32px;
    background:
      radial-gradient(
        50% 50% at 97% 55%,
        rgb(112 169 255 / 1) 0%,
        rgb(30 84 236 / 0.69) 41%,
        rgb(0 0 0 / 0) 100%
      ),
      radial-gradient(
        50% 50% at 103% 46%,
        rgb(112 169 255 / 1) 0%,
        rgb(30 84 236 / 0.69) 41%,
        rgb(0 0 0 / 0) 100%
      ),
      linear-gradient(234deg, rgb(112 169 255 / 0.1) 0%, rgb(255 255 255 / 0.05) 100%);
  }

  .contact-card {
    flex-direction: row;
    align-items: center;
    gap: 32px;
    width: auto;
    padding: 16px;
    border-radius: 100px;
    background:
      radial-gradient(
        50% 50% at 67% 62%,
        rgb(0 0 0 / 0) 0%,
        rgb(42 96 239 / 0.51) 14%,
        rgb(112 169 255 / 1) 24%,
        rgb(30 84 236 / 0.69) 34%,
        rgb(0 0 0 / 0) 54%
      ),
      radial-gradient(
        50% 50% at 103% 46%,
        rgb(112 169 255 / 1) 0%,
        rgb(30 84 236 / 0.69) 41%,
        rgb(0 0 0 / 0) 100%
      ),
      linear-gradient(234deg, rgb(112 169 255 / 0.02) 0%, rgb(255 255 255 / 0.01) 100%);
  }

  .contact-card__person {
    padding: 0;
  }

  .button {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .cta {
    margin-top: 128px;
  }

  .cta__card {
    gap: 48px;
    padding: 104px 48px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 32px;
}

.footer {
  display: grid;
  gap: 32px;
  padding: 32px 16px;
  border-radius: 28px;
}

.footer__logo img {
  width: 164px;
  height: 24px;
}

.footer__nav {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  gap: 24px;
}

.footer__contacts {
  display: grid;
  justify-items: start;
  gap: 24px;
}

.footer__nav a,
.footer__contacts a {
  line-height: 1.25;
}

.footer .lang {
  color: var(--text-soft);
}

@media (min-width: 768px) {
  .site-footer {
    margin-top: 32px;
  }

  .footer {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo lang"
      "nav  contacts";
    align-items: center;
    padding: 24px 32px;
    border-radius: 32px;
  }

  .footer__logo {
    grid-area: logo;
  }

  .footer .lang {
    grid-area: lang;
    justify-self: end;
  }

  .footer__nav {
    grid-area: nav;
    display: flex;
    grid-auto-flow: row;
    gap: 24px;
  }

  .footer__contacts {
    grid-area: contacts;
    justify-items: end;
    gap: 8px;
  }
}

@media (min-width: 1024px) {
  .page {
    padding-bottom: 64px;
  }
}

/* Широкий экран: одна строка, как в десктопном макете */
@media (min-width: 1200px) {
  .footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 8px 24px;
    border-radius: 56px;
  }

  .footer__contacts {
    display: flex;
    gap: 24px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
