/* ==========================================================================
   Components: reusable UI pieces (buttons, header, cards, FAQ, chat button)
   ========================================================================== */

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; white-space: nowrap; cursor: pointer; border: 0;
  transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(180deg, var(--blue), var(--blue-2));
  box-shadow: 0 10px 30px -10px rgba(31,123,255,.7), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn--primary:hover { box-shadow: 0 14px 40px -10px rgba(31,123,255,.95), inset 0 1px 0 rgba(255,255,255,.25); }
.btn--ghost { border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.btn--ghost:hover { background: rgba(255,255,255,.06); }
.btn--sm { height: 42px; padding: 0 18px; font-size: 14px; }
.btn--block { width: 100%; }
.icon-tg { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* ---------- eyebrow + section heading ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--blue); border-radius: 2px; }

.sec-head { max-width: 640px; margin-bottom: 52px; }
.sec-head--center { text-align: center; margin-inline: auto; }
.sec-head h2 { font-size: clamp(32px, 4.2vw, 50px); font-weight: 800; margin: 14px 0; }
.sec-head p { color: var(--muted); font-size: 17px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(5,8,15,.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(26,37,64,.6);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 20px; }
.nav__logo img { height: 28px; width: auto; }
.nav__links { display: flex; gap: 30px; list-style: none; font-size: 14px; color: var(--muted); }
.nav__links a:hover { color: var(--text); }

/* ---------- generic card ---------- */
.card {
  padding: 28px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: #2a3d6b; }

.icon-box {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(180deg, rgba(31,123,255,.22), rgba(31,123,255,.06));
  border: 1px solid rgba(63,184,255,.25);
}
.icon-box svg, .chip svg {
  width: 22px; height: 22px; stroke: var(--cyan); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- chips (devices) ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--line); font-weight: 500; font-size: 15px;
}
.chip svg { width: 20px; height: 20px; }

/* ---------- segmented toggle ---------- */
.segmented {
  display: inline-flex; padding: 5px; gap: 4px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--line);
}
.segmented button {
  border: 0; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 14px; padding: 11px 20px; border-radius: 10px; cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: linear-gradient(180deg, var(--blue), var(--blue-2)); color: #fff; }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 22px; font-weight: 600;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--cyan); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--muted); font-size: 15px; }

/* ---------- floating Telegram button ---------- */
.chat-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: linear-gradient(180deg, #2aa3ef, #1c8ad6);
  box-shadow: 0 12px 30px -8px rgba(42,163,239,.7);
}
.chat-fab svg { width: 26px; height: 26px; fill: #fff; margin-left: -2px; }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .nav__links { display: none; }
  .segmented button { padding: 10px 14px; }
}
