/*
 * Shared primitives of the "New Version" main page design.
 * Every wgt-home-* block loads this file before its own stylesheet.
 */

:root {
  --home-border: #f5f3ff;
  --home-purple: #8b6fff;
  --home-purple-strong: #7e4de6;
  --home-title: #1d1d1d;
  --home-subtitle: #667085;
  --home-surface: #f8f8f8;
  --home-surface-border: #ececec;
  --home-card-border: #f6f4ff;
  --home-tag-bg: #faf8ff;
  --home-text-gradient: linear-gradient(118deg, #8b6fff 107.63%, #d8cbfd 115.05%);
  --home-tag-badge-bg: linear-gradient(119deg, #8b6fff 41.86%, #bda6ff 277.44%);
  --home-module-media-bg: linear-gradient(110deg, #f9f9f9 23.08%, #e0d8ff 60.34%, #f5f1ff 110.75%);
  --home-promo-media-bg: linear-gradient(118deg, #8b6fff -1.35%, #cfc2ff 46.94%, #d8cbfd 95.86%);
  --home-card-shadow: 0 4px 26px rgba(45, 44, 52, 0.05);
  --home-section-padding: 1.5625rem;
  --home-content-width: 1200px;
  --white: #ffffff;
  --primary-purple-2: #d7cdff;
}

.wgt-home {
  --home-gap: 42px;

  box-sizing: border-box;
  padding: 0 var(--home-section-padding);
  font-family: "Figtree", sans-serif;
}

.wgt-home *,
.wgt-home *::before,
.wgt-home *::after {
  box-sizing: border-box;
  font-family: inherit;
}

.wgt-home .home-inner {
  width: 100%;
  max-width: var(--home-content-width);
  margin: 0 auto;
}

/* ===== Section header ===== */

.wgt-home .home-section-head {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: flex-start;
}

.wgt-home .home-section-head.center {
  align-items: center;
  text-align: center;
  padding: 0 20px;
}

.wgt-home .home-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--home-border);
  border-radius: 50px;
  background: var(--home-tag-bg);
  box-shadow: inset 4px 4px 4px rgba(255, 255, 255, 0.25), 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.wgt-home .home-tag.home-tag-banner {
  background: var(--white);
}

.wgt-home .home-tag img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.wgt-home .home-tag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 6px 10px;
  border-radius: 25px;
  background: var(--home-tag-badge-bg);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.wgt-home .home-tag > span:not(.home-tag-badge) {
  font-family: "Figtree", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.42;
  white-space: nowrap;
  background: var(--home-text-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.wgt-home .home-section-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.wgt-home .home-section-title,
.wgt-home .home-section-title :is(h1, h2, h3, h4, h5, h6, p) {
  margin: 0;
  color: var(--home-title);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.2;
}

.wgt-home .home-section-description,
.wgt-home .home-section-description p {
  margin: 0;
  color: var(--home-subtitle);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

/* ===== Buttons ===== */

.wgt-home .home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 250px;
  padding: 14px 32px;
  border: 1px solid transparent;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wgt-home .home-btn-primary {
  background: var(--home-purple-strong);
  color: var(--white);
}

.wgt-home .home-btn-primary:hover {
  background: var(--primary-color-0);
  color: var(--white);
}

.wgt-home .home-btn-secondary {
  background: var(--white);
  border-color: var(--home-border);
  color: var(--home-title);
}

.wgt-home .home-btn-secondary:hover {
  border-color: var(--home-purple);
  color: var(--home-title);
}

/* ===== Link with arrow ===== */

.wgt-home .home-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary-color-1);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  padding-bottom: 2px;
}

.wgt-home .home-link::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: currentColor;
  mask: url("/static/img/home/to-link-16x16.svg") no-repeat center / contain;
  -webkit-mask: url("/static/img/home/to-link-16x16.svg") no-repeat center / contain;
  transition: transform 0.2s ease;
}

.wgt-home .home-link::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width 0.2s ease;
}

.wgt-home .home-link:hover::before {
  width: 100%;
}

.wgt-home .home-link:hover::after {
  transform: rotate(45deg);
}

/* ===== Cards ===== */

.wgt-home .home-card {
  background: var(--home-surface);
  border: 1px solid var(--home-surface-border);
  border-radius: 10px;
}

.wgt-home .home-card-white {
  background: #fff;
  border: 1px solid var(--home-card-border);
  border-radius: 10px;
  box-shadow: var(--home-card-shadow);
}

/* ===== Decorative grid background ===== */

.wgt-home .home-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(99, 52, 200, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99, 52, 200, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 75%);
}

@media (max-width: 1280px) {
  .wgt-home {
    --home-section-padding: 1rem;
  }
}

@media (max-width: 992px) {
  .wgt-home {
    --home-section-padding: 1rem;
    --home-gap: 32px;
  }

  .wgt-home .home-section-head {
    gap: 24px;
  }

  .wgt-home .home-section-title,
  .wgt-home .home-section-title :is(h1, h2, h3, h4, h5, h6, p) {
    font-size: 30px;
  }
}

@media (max-width: 768px) {
  .wgt-home {
    --home-section-padding: 0.75rem;
  }

  .wgt-home .home-section-title,
  .wgt-home .home-section-title :is(h1, h2, h3, h4, h5, h6, p) {
    font-size: 26px;
  }

  .wgt-home .home-btn {
    width: 100%;
    min-width: 0;
  }

  .wgt-home .home-tag {
    height: 36px;
    gap: 6px;
    padding: 4px 8px;
  }

  .wgt-home .home-tag img {
    width: 24px;
    height: 24px;
  }

  .wgt-home .home-tag-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    font-size: 11px;
  }
}
