/* =====================================================================
   FRIENDS PROMO — рекламний блок «НАШІ ДРУЗІ» під hero на головній.
   Підключається останнім, використовує змінні палітри з style.css /
   polish.css (--green, --blue, --text) і не змінює жодного існуючого
   правила.

   Композиція: двоколонковий featured-банер.
   Ліворуч — бейдж, заголовок, опис і CTA (на темнішій частині
   поверхні, щоб текст був максимально читабельним). Праворуч —
   абстрактний візуал: логотип у «орбіті» зі скляними іконками (у дусі
   іконки застосунку) на найяскравішій частині градієнта.
   Розмітка: див. <section class="friends-promo"> в index.html.
   ===================================================================== */

.friends-promo {
  --fp-cyan: #7ff6ff;
  --fp-teal: #19d3da;
  --fp-green: #42efad;
  --fp-mint: #b6ffd9;
  --fp-ink: #04251c;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center;
  gap: 24px;
  margin: 44px 0 40px;
  padding: 48px 52px 48px 56px;
  border: 1.5px solid transparent;
  border-radius: 28px;
  /* поверхня (padding-box) + градієнтна рамка (border-box) */
  background:
    radial-gradient(60% 120% at 82% 50%, rgba(66, 239, 173, .55), transparent 70%),
    radial-gradient(50% 90% at 0% 0%, rgba(25, 211, 218, .22), transparent 70%),
    linear-gradient(100deg, #06293b 0%, #08475a 38%, #0a7771 72%, #14a982 100%) padding-box,
    linear-gradient(120deg, #7ff6ff, #19d3da 38%, #42efad 72%, #b6ffd9) border-box;
  box-shadow:
    0 0 0 1px rgba(66, 239, 173, .10),
    0 0 52px rgba(25, 211, 218, .28),
    0 0 120px rgba(66, 239, 173, .16),
    0 30px 64px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: box-shadow .35s ease, transform .35s ease;
}

/* тонка технічна сітка в дусі фону сайту, що розчиняється зліва направо */
.friends-promo::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(100deg, transparent 25%, #000 85%);
  mask-image: linear-gradient(100deg, transparent 25%, #000 85%);
  pointer-events: none;
}

/* діагональний «промінь» світла й верхній відблиск */
.friends-promo::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 92% -20%, rgba(255, 255, 255, .26), transparent 36%),
    linear-gradient(112deg, transparent 52%, rgba(255, 255, 255, .08) 52.15%, transparent 66%);
  pointer-events: none;
}

.friends-promo:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(66, 239, 173, .2),
    0 0 64px rgba(25, 211, 218, .4),
    0 0 140px rgba(66, 239, 173, .22),
    0 34px 70px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .28);
}

/* ---------------------------------------------------------------------
   Ліва колонка: контент
--------------------------------------------------------------------- */
.friends-promo-body { min-width: 0; }

.friends-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 8px 16px 8px 13px;
  border: 1px solid rgba(182, 255, 217, .45);
  border-radius: 99px;
  background: rgba(3, 20, 30, .6);
  color: var(--fp-mint);
  font: 600 12px 'DM Mono', monospace;
  letter-spacing: 2.2px;
  box-shadow: 0 0 20px rgba(66, 239, 173, .3), inset 0 0 12px rgba(66, 239, 173, .12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.friends-promo-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fp-green);
  box-shadow: 0 0 0 0 rgba(66, 239, 173, .7), 0 0 12px var(--fp-green);
  animation: fp-pulse 2.4s ease-out infinite;
}
@keyframes fp-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(66, 239, 173, .65), 0 0 12px var(--fp-green); }
  70%  { box-shadow: 0 0 0 9px rgba(66, 239, 173, 0), 0 0 12px var(--fp-green); }
  100% { box-shadow: 0 0 0 0 rgba(66, 239, 173, 0), 0 0 12px var(--fp-green); }
}

.friends-promo h2 {
  margin: 0 0 16px;
  max-width: 14em;
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.4px;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(3, 20, 30, .5);
}

.friends-promo-copy {
  margin: 0 0 30px;
  max-width: 30em;
  color: #cfeeee;
  font-size: 16.5px;
  line-height: 1.65;
}

/* ---------------------------------------------------------------------
   CTA: друга за вагою після заголовка
--------------------------------------------------------------------- */
.friends-promo-cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 62px;
  padding: 17px 30px;
  border-radius: 16px;
  background: linear-gradient(120deg, #7ff6ff 0%, #42efad 100%);
  color: var(--fp-ink);
  font: 800 17px Manrope, Arial, sans-serif;
  letter-spacing: -.1px;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .5) inset,
    0 12px 28px rgba(3, 20, 30, .45),
    0 0 34px rgba(66, 239, 173, .5);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
/* діагональний блик при наведенні */
.friends-promo-cta::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
  pointer-events: none;
}
.friends-promo-cta:hover {
  transform: translateY(-3px);
  filter: brightness(1.05);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .65) inset,
    0 18px 36px rgba(3, 20, 30, .5),
    0 0 52px rgba(66, 239, 173, .75);
}
.friends-promo-cta:hover::before { left: 130%; }
.friends-promo-cta:active { transform: translateY(0) scale(.98); }
.friends-promo-cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .5) inset,
    0 0 0 7px rgba(3, 20, 30, .55),
    0 0 34px rgba(66, 239, 173, .5);
}

.friends-promo-icon { flex: none; display: block; width: 24px; height: 24px; }
.friends-promo-arrow { display: inline-block; font-size: 20px; line-height: 1; transition: transform .25s ease; }
.friends-promo-cta:hover .friends-promo-arrow { transform: translateX(5px); }

/* ---------------------------------------------------------------------
   Права колонка: абстрактний візуал — логотип в «орбіті»
--------------------------------------------------------------------- */
.friends-promo-visual {
  --fp-size: 320px;
  position: relative;
  justify-self: center;
  width: var(--fp-size);
  height: var(--fp-size);
  max-width: 100%;
  display: grid;
  place-items: center;
}

/* м'яке гало за логотипом */
.friends-promo-visual::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(182, 255, 217, .55), rgba(66, 239, 173, .18) 55%, transparent 72%);
  filter: blur(8px);
}

.fp-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.fp-ring-1 {
  inset: 14%;
  border: 1.5px solid rgba(255, 255, 255, .4);
  box-shadow: 0 0 22px rgba(127, 246, 255, .25), inset 0 0 22px rgba(127, 246, 255, .12);
}
.fp-ring-2 {
  inset: 0;
  border: 1.5px dashed rgba(255, 255, 255, .45);
  animation: fp-spin 60s linear infinite;
}
@keyframes fp-spin { to { transform: rotate(360deg); } }

.friends-promo-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 46%;
  height: 46%;
  object-fit: cover;
  border: 2px solid rgba(182, 255, 217, .8);
  border-radius: 28px;
  background: #0b1a30;
  box-shadow:
    0 18px 40px rgba(3, 20, 30, .55),
    0 0 0 8px rgba(255, 255, 255, .07),
    0 0 44px rgba(66, 239, 173, .55);
  transition: transform .35s ease, box-shadow .35s ease;
}
.friends-promo:hover .friends-promo-logo {
  transform: scale(1.05);
  box-shadow:
    0 18px 40px rgba(3, 20, 30, .55),
    0 0 0 8px rgba(255, 255, 255, .1),
    0 0 60px rgba(66, 239, 173, .75);
}

/* скляні іконки-«супутники» на орбіті */
.fp-chip {
  position: absolute;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 16px;
  background: rgba(4, 30, 42, .62);
  color: var(--fp-mint);
  box-shadow: 0 10px 24px rgba(3, 20, 30, .4), 0 0 22px rgba(66, 239, 173, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.fp-chip-1 { top: 2%;  left: 50%; margin-left: -26px; }
.fp-chip-2 { bottom: 17%; left: 1%; color: var(--fp-cyan); }
.fp-chip-3 { bottom: 17%; right: 1%; }

/* Підказка для екранних читачів: посилання відкривається в новій вкладці */
.sr-only-promo {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------------
   Адаптивність
--------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .friends-promo { padding: 40px 36px 40px 42px; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .friends-promo-visual { --fp-size: 260px; }
  .fp-chip { width: 46px; height: 46px; border-radius: 14px; }
  .fp-chip-1 { margin-left: -23px; }
}

/* Планшет: візуал стає компактнішим, кнопка зберігає вагу */
@media (max-width: 860px) {
  .friends-promo { padding: 34px 30px; gap: 12px; margin: 36px 0 32px; }
  .friends-promo-visual { --fp-size: 210px; }
  .friends-promo h2 { letter-spacing: -1px; }
  .friends-promo-copy { margin-bottom: 26px; font-size: 15.5px; }
}

/* Мобільні: візуал зверху, далі текст, кнопка на всю ширину */
@media (max-width: 610px) {
  .friends-promo {
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 32px 0 28px;
    padding: 24px 20px 24px;
    border-radius: 22px;
    background:
      radial-gradient(90% 55% at 50% 0%, rgba(66, 239, 173, .5), transparent 70%),
      linear-gradient(180deg, #0a8a77 0%, #08566a 42%, #06293b 100%) padding-box,
      linear-gradient(140deg, #7ff6ff, #19d3da 38%, #42efad 72%, #b6ffd9) border-box;
  }
  .friends-promo::before {
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 55%);
    mask-image: linear-gradient(180deg, #000, transparent 55%);
  }
  .friends-promo-visual { order: -1; --fp-size: 200px; margin-bottom: 4px; }
  .fp-chip { width: 42px; height: 42px; border-radius: 13px; }
  .fp-chip-1 { margin-left: -21px; }
  .friends-promo-badge { font-size: 11px; margin-bottom: 14px; letter-spacing: 1.8px; }
  .friends-promo h2 { font-size: 28px; margin-bottom: 12px; }
  .friends-promo-copy { font-size: 15px; margin-bottom: 22px; }
  .friends-promo-cta { display: flex; width: 100%; min-height: 58px; font-size: 16px; padding: 15px 22px; }
}

@media (max-width: 380px) {
  .friends-promo { padding: 22px 16px; }
  .friends-promo-visual { --fp-size: 176px; }
  .friends-promo h2 { font-size: 25px; }
}

/* ---------------------------------------------------------------------
   Reduced motion
--------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .friends-promo,
  .friends-promo-logo,
  .friends-promo-cta,
  .friends-promo-cta::before,
  .friends-promo-arrow { transition: none; }
  .friends-promo-badge::before,
  .fp-ring-2 { animation: none; }
  .friends-promo:hover,
  .friends-promo:hover .friends-promo-logo,
  .friends-promo-cta:hover,
  .friends-promo-cta:active,
  .friends-promo-cta:hover .friends-promo-arrow { transform: none; }
}
