/*
 * MARI homepage — map, tools and copy refinement v8.
 * Loaded after polish-v7.css.
 */

@media (min-width: 901px) {
  .main-nav {
    gap: clamp(22px, 2.9vw, 46px);
  }
}

/* A single macOS-like shelf: three apps, a divider and one clear AI tile. */

.about-tools ul {
  align-items: center;
  flex-wrap: nowrap;
  gap: 9px;
}

.about-tools .tool-app,
.about-tools .tool-app:last-child {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 2px;
  overflow: hidden;
  border: 1px solid rgba(213, 229, 255, 0.3);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.035)),
    rgba(18, 33, 57, 0.72);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -7px 14px rgba(0, 8, 28, 0.22);
}

.about-tools .tool-app::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 8px;
  left: 8px;
  z-index: 2;
  height: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent);
  opacity: 0.78;
  pointer-events: none;
}

.about-tools .tool-app img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: contain;
  filter: none;
}

.about-tools .tool-plus {
  width: 21px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 21px;
  border: 0;
  background: transparent;
  color: rgba(205, 220, 242, 0.58);
  font-size: 21px;
  font-weight: 300;
  line-height: 1;
}

.ai-app-icon {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle at 74% 20%, rgba(85, 166, 255, 0.32), transparent 36%),
    linear-gradient(145deg, #5f6c80, #303947 68%, #212936);
  color: #f7faff;
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.055em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -8px 14px rgba(0, 0, 0, 0.18);
}

.ai-app-icon::before {
  content: "";
  position: absolute;
  right: 7px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #79caff;
  box-shadow: 0 0 10px rgba(83, 181, 255, 0.72);
}

/* One quiet icon language for the stat cards. */

.stat-icon--type {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #dbe5f3;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 690;
  letter-spacing: -0.13em;
}

.stat-icon--education {
  position: relative;
  width: 27px;
  height: 25px;
  color: #dbe5f3;
}

.stat-icon--education::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 3px;
  width: 25px;
  height: 14px;
  display: block;
  border: 0;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 36%, 50% 73%, 0 36%);
  filter: none;
}

.stat-icon--education::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 2px;
  width: 13px;
  height: 7px;
  display: block;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  border-radius: 0 0 8px 8px;
}

/* Europe and western Russia: real outlines, complete dots and an accurate marker. */

.russia-map::before {
  opacity: 0.86;
  background: url("assets/russia-map-dots-wide.png") center / 100% 100% no-repeat;
}

.russia-map .map-marker {
  left: 48%;
  top: 24%;
}

.map-caption {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 2px 14px;
}

.map-arrow {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(237, 245, 255, 0.82);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
}

.map-caption p {
  justify-content: flex-start;
  font-size: 11.5px;
  line-height: 1.25;
}

.map-caption small {
  font-size: 10.5px;
  line-height: 1.3;
}

@media (max-width: 700px) {
  .nav-open .main-header,
  .nav-open .main-header.is-scrolled {
    position: fixed;
    background: transparent;
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .main-nav {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100vw;
    height: 100svh;
    min-height: 640px;
  }

  .home-v2 .hero-atmosphere {
    object-position: 78% center;
  }

  .home-v2 .hero .hero-art::after {
    content: "";
    position: absolute;
    right: -23%;
    bottom: -4%;
    z-index: 1;
    width: 92vw;
    height: 52vh;
    background: linear-gradient(145deg, #ff99ad, #ff6d8b 58%, #dc4771);
    clip-path: polygon(
      100% 0,
      100% 100%,
      0 100%,
      0 82%,
      18% 82%,
      18% 64%,
      36% 64%,
      36% 46%,
      54% 46%,
      54% 28%,
      73% 28%,
      73% 10%,
      89% 10%,
      89% 0
    );
    opacity: 0.74;
    filter: drop-shadow(0 0 28px rgba(255, 92, 132, 0.42));
  }

  .home-v2 .hero-grid {
    left: auto;
    right: -35%;
    bottom: -5%;
    z-index: 3;
    width: 94vw;
    height: 39vh;
    display: block;
    border: 2px solid rgba(225, 244, 255, 0.68);
    border-radius: 42px;
    opacity: 0.74;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.27), rgba(40, 132, 255, 0.05)),
      rgba(0, 88, 230, 0.14);
    background-image: none;
    box-shadow:
      inset 0 2px 0 rgba(255, 255, 255, 0.48),
      inset 0 -24px 42px rgba(2, 42, 143, 0.2),
      0 24px 55px rgba(0, 35, 129, 0.24);
    -webkit-mask-image: none;
    mask-image: none;
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
    transform: rotate(-37deg);
  }

  .about-tools ul {
    gap: 7px;
  }

  .about-tools .tool-app,
  .about-tools .tool-app:last-child {
    width: 47px;
    height: 47px;
    border-radius: 14px;
  }

  .about-tools .tool-app img,
  .ai-app-icon {
    border-radius: 11px;
  }

  .about-tools .tool-plus {
    width: 18px;
    height: 47px;
    flex-basis: 18px;
    font-size: 19px;
  }

  .ai-app-icon {
    font-size: 15px;
  }

  .russia-map::before {
    background-image: url("assets/russia-map-dots-mobile.png");
  }

  .russia-map .map-marker {
    left: 48%;
    top: 23%;
  }

  .map-caption p {
    flex-direction: row;
    font-size: 10.5px;
  }

  .map-caption small {
    font-size: 9.5px;
  }
}

@media (max-width: 380px) {
  .about-tools ul {
    gap: 5px;
  }

  .about-tools .tool-app,
  .about-tools .tool-app:last-child {
    width: 44px;
    height: 44px;
  }

  .about-tools .tool-plus {
    width: 16px;
    height: 44px;
    flex-basis: 16px;
  }
}
