/* ═══════════════════════════════════════════════════════
   support.css — сторінка /support/
   Поверх глобального style.css. Класи з префіксом sp-.
   Підключати: <link rel="stylesheet" href="/style/support.css?v=1.0">
   ═══════════════════════════════════════════════════════ */

:root {
  --sp-crit: #F87171;
  --sp-high: #FB923C;
  --sp-med:  #FBBF24;
  --sp-low:  #4ADE80;
  --sp-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* базовий reveal для скрол-анімацій */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

.sp-section { padding: 96px 5vw; position: relative; }

/* ── HERO ── */
.sp-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 5vw 80px;
  overflow: hidden;
}
.sp-hero-inner { position: relative; z-index: 2; max-width: 780px; }

.sp-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
}
.sp-orb--1 { width: 520px; height: 520px; top: -120px; left: -80px;
  background: radial-gradient(circle, rgba(108,62,244,.35), transparent 70%); }
.sp-orb--2 { width: 460px; height: 460px; bottom: -140px; right: -60px;
  background: radial-gradient(circle, rgba(236,72,153,.28), transparent 70%); }
.sp-orb--3 { width: 300px; height: 300px; top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(168,85,247,.22), transparent 70%); }

.sp-grid-fade {
  position: absolute; inset: -10%;
  background-image:
    linear-gradient(rgba(168,85,247,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,85,247,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 20%, transparent 75%);
  z-index: 1;
}

.sp-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 18px; border-radius: 30px;
  border: 1px solid rgba(168,85,247,.4);
  background: rgba(168,85,247,.1);
  font-size: 13px; color: #C084FC; margin-bottom: 28px;
}
.sp-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80;
  box-shadow: 0 0 10px #4ADE80; animation: pulse 2s infinite; }

.sp-hero h1 {
  font-size: clamp(38px, 7vw, 78px);
  font-weight: 900; line-height: 1.04; letter-spacing: -2px; margin-bottom: 22px;
}
.sp-hero-sub {
  font-size: clamp(16px, 2.3vw, 21px); color: var(--muted);
  max-width: 600px; margin: 0 auto 40px;
}
.sp-hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

/* «пульс» моніторингу */
.sp-pulse {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 12px 22px; border-radius: 14px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
}
.sp-pulse svg { width: 200px; height: 34px; }
.sp-pulse-line {
  fill: none; stroke: #4ADE80; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(74,222,128,.6));
  stroke-dasharray: 640; stroke-dashoffset: 640;
  animation: sp-trace 2.6s linear infinite;
}
@keyframes sp-trace { to { stroke-dashoffset: -640; } }
.sp-pulse-label { font-family: var(--sp-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: #4ADE80; }

.sp-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--border); border-radius: 16px; z-index: 2;
}
.sp-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px;
  margin-left: -2px; border-radius: 4px; background: var(--c2); animation: sp-wheel 1.6s infinite; }
@keyframes sp-wheel { 0%{opacity:0;transform:translateY(0)} 40%{opacity:1} 80%,100%{opacity:0;transform:translateY(12px)} }

/* ── НЕ ОБОВ'ЯЗКОВО ── */
.sp-optional-card {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center;
  background: linear-gradient(135deg, rgba(108,62,244,.12), rgba(236,72,153,.08));
  border: 1px solid rgba(168,85,247,.3); border-radius: 24px; padding: 48px;
}
.sp-lead { color: var(--muted); font-size: 17px; line-height: 1.7; margin: 8px 0 20px; }
.sp-lead strong { color: var(--text); }
.sp-inline-link, .sp-matrix-note a { color: #A78BFA; text-decoration: none; font-weight: 600; }
.sp-inline-link:hover { color: #fff; }
.sp-optional-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.sp-optional-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text); }
.sp-x { color: #4ADE80; font-weight: 700; flex-shrink: 0; }

@media (max-width: 760px) { .sp-optional-card { grid-template-columns: 1fr; padding: 32px 24px; gap: 28px; } }

/* ── ЩО ВХОДИТЬ ── */
.sp-feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 18px; }
.sp-feat {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 18px; padding: 30px;
  transition: transform .3s, border-color .3s;
  transition-delay: calc(var(--i) * 60ms);
}
.sp-feat:hover { transform: translateY(-6px); border-color: rgba(168,85,247,.55); }
.sp-feat-ic {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 16px; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c3));
  box-shadow: 0 8px 24px rgba(108,62,244,.35);
}
.sp-feat h3 { font-size: 18px; font-weight: 500; margin-bottom: 8px; }
.sp-feat p { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ── SLA ── */
.sp-sla-picker { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.sp-pill {
  padding: 10px 20px; border-radius: 30px; font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--card); color: var(--muted); border: 1px solid var(--border);
  transition: all .2s;
}
.sp-pill:hover { color: var(--text); border-color: rgba(168,85,247,.5); }
.sp-pill.is-active { color: #fff; background: rgba(108,62,244,.2); border-color: var(--c1); }

.sp-ticket {
  max-width: 620px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; margin-bottom: 40px;
  border-left: 4px solid var(--sp-crit); transition: border-color .35s;
}
.sp-ticket-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px; background: var(--bg3); border-bottom: 1px solid var(--border);
}
.sp-ticket-id { font-family: var(--sp-mono); font-size: 13px; color: var(--muted); letter-spacing: .06em; }
.sp-ticket-status { font-family: var(--sp-mono); font-size: 12px; color: #4ADE80; }
.sp-ticket-body { padding: 24px 22px 8px; }
.sp-ticket-tag {
  display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 700;
  margin-bottom: 14px; transition: all .35s;
}
.sp-ticket-scenario { color: var(--text); font-size: 16px; line-height: 1.5; min-height: 48px; }
.sp-ticket-sla { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
.sp-sla-box { background: var(--bg2); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.sp-sla-when { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.sp-sla-time { font-family: var(--sp-mono); font-size: clamp(20px, 3vw, 28px); font-weight: 700; color: #fff; }

@media (max-width: 520px) { .sp-ticket-sla, .sp-sla-box { grid-template-columns: 1fr; } }

/* матриця */
.sp-matrix-wrap { max-width: 760px; }
.sp-matrix { width: 100%; border-collapse: collapse; font-size: 15px; }
.sp-matrix th {
  padding: 14px 16px; text-align: left; font-weight: 500;
  background: var(--bg2); border: 1px solid var(--border); font-size: 13px;
  text-transform: uppercase; letter-spacing: 1px; color: var(--muted);
}
.sp-matrix td { padding: 15px 16px; border: 1px solid rgba(255,255,255,.06); color: var(--muted); }
.sp-matrix td:first-child { color: var(--text); font-weight: 500; }
.sp-matrix tr[data-row] { transition: background .25s; }
.sp-matrix tr.is-hi td { background: rgba(108,62,244,.12); }
.sp-matrix .dot-crit,.sp-matrix .dot-high,.sp-matrix .dot-med,.sp-matrix .dot-low {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px;
}
.dot-crit { background: var(--sp-crit); }
.dot-high { background: var(--sp-high); }
.dot-med  { background: var(--sp-med); }
.dot-low  { background: var(--sp-low); }
.sp-matrix-note { color: var(--muted); font-size: 13px; margin-top: 14px; line-height: 1.6; }

@media (max-width: 600px) { .sp-matrix { font-size: 12.5px; } .sp-matrix th,.sp-matrix td { padding: 10px 9px; } }

/* ── РЕЗЕРВНІ КОПІЇ: драбина ── */
.sp-ladder { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.sp-tier { display: flex; align-items: center; gap: 20px; }
.sp-tier-bar {
  flex: 1; height: 44px; border-radius: 10px; background: var(--bg2);
  border: 1px solid var(--border); overflow: hidden; display: flex; align-items: center; padding: 5px;
}
.sp-tier-bar span {
  display: block; height: 100%; border-radius: 6px;
  width: 0;
  background: linear-gradient(90deg, var(--c1), var(--c3));
  transition: width 1.1s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in .sp-tier-bar span { width: calc(var(--n) / 8 * 100%); }
.sp-tier-info { min-width: 210px; }
.sp-tier-info strong { display: block; font-size: 15px; font-weight: 500; }
.sp-tier-info span { font-size: 13px; color: var(--muted); font-family: var(--sp-mono); }
.sp-backup-note { color: var(--muted); font-size: 14px; margin-top: 24px; max-width: 640px; line-height: 1.7; }

@media (max-width: 560px) { .sp-tier { flex-direction: column; align-items: stretch; gap: 8px; }
  .sp-tier-info { min-width: 0; } }

/* ── КАНАЛИ ── */
.sp-chan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 18px; }
.sp-chan {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 28px;
  transition: transform .3s, border-color .3s;
}
.sp-chan:hover { transform: translateY(-4px); }
.sp-chan--primary { border-color: rgba(108,62,244,.5); background: rgba(108,62,244,.08); }
.sp-chan-rank {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--c2); margin-bottom: 12px;
}
.sp-chan--primary .sp-chan-rank { color: #4ADE80; }
.sp-chan h3 { font-size: 19px; font-weight: 500; margin-bottom: 8px; }
.sp-chan p { font-size: 14px; color: var(--muted); line-height: 1.65; }
.sp-work-hours { margin-top: 24px; color: var(--muted); font-size: 15px; }
.sp-work-hours strong { color: var(--text); font-family: var(--sp-mono); }

/* ── ЦІНИ ── */
.sp-countdown { text-align: center; margin: 8px auto 48px; }
.sp-cd-label { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin-bottom: 16px; }
.sp-cd-grid { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.sp-cd-box {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 22px; min-width: 78px;
}
.sp-cd-num {
  font-size: clamp(28px, 5vw, 44px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #A78BFA, #EC4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.sp-cd-unit { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 8px; }

.sp-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 860px; }
.sp-plan { position: relative; border-radius: 22px; padding: 34px 30px 30px; border: 1px solid var(--border); }
.sp-plan--hot {
  background: linear-gradient(160deg, rgba(108,62,244,.16), rgba(236,72,153,.1));
  border-color: rgba(168,85,247,.5);
  box-shadow: 0 0 48px rgba(108,62,244,.2);
}
.sp-plan--muted { background: var(--bg2); opacity: .92; }
.sp-plan-flag {
  position: absolute; top: -13px; left: 30px; padding: 5px 16px; border-radius: 20px;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c3));
}
.sp-plan-flag--grey { background: var(--bg3); color: var(--muted); border: 1px solid var(--border); }
.sp-plan-title { font-size: 22px; font-weight: 800; margin: 6px 0 22px; }
.sp-plan-rows { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }
.sp-plan-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.06);
}
.sp-plan-row span { color: var(--muted); font-size: 14px; }
.sp-plan-row b { font-size: 19px; font-weight: 800; }
.sp-plan-row em { font-size: 12px; font-weight: 400; color: var(--muted); font-style: normal; }
.sp-free { color: #4ADE80 !important; }
.sp-free s { color: var(--muted); font-size: 14px; font-weight: 400; margin-left: 6px; }
.sp-plan-save {
  text-align: center; padding: 12px; border-radius: 12px; margin-bottom: 20px; font-size: 14px; color: var(--text);
  background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.3);
}
.sp-plan-save b { color: #4ADE80; font-size: 17px; }
.sp-plan-save--muted { background: rgba(234,179,8,.08); border-color: rgba(234,179,8,.25); }
.sp-plan-save--muted b { color: #FDE047; }
.sp-plan-cta { display: block; text-align: center; width: 100%; }
.sp-plan-cta--ghost {
  padding: 14px; border-radius: 12px; border: 1px solid var(--border);
  color: var(--muted); font-weight: 600; font-size: 14px; cursor: default;
}

@media (max-width: 720px) { .sp-plans { grid-template-columns: 1fr; } }

.sp-formula {
  margin-top: 40px; max-width: 640px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 18px; padding: 28px 30px;
}
.sp-formula-title { font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: var(--c2); margin-bottom: 14px; }
.sp-formula-code {
  display: block; font-family: var(--sp-mono); font-size: clamp(15px, 2.6vw, 20px); color: #fff;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin-bottom: 14px;
}
.sp-formula-note { color: var(--muted); font-size: 14px; line-height: 1.7; }

/* ── FAQ ── */
.sp-faq-list { max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
.sp-faq-item {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px;
  padding: 4px 22px; transition: border-color .2s;
}
.sp-faq-item[open] { border-color: rgba(168,85,247,.5); }
.sp-faq-item summary {
  cursor: pointer; padding: 18px 0; font-size: 16px; font-weight: 500; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.sp-faq-item summary::-webkit-details-marker { display: none; }
.sp-faq-item summary::after { content: '+'; font-size: 24px; color: var(--c2); transition: transform .25s; }
.sp-faq-item[open] summary::after { transform: rotate(45deg); }
.sp-faq-item p { color: var(--muted); font-size: 15px; line-height: 1.7; padding: 0 0 20px; }

/* ── reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .sp-pulse-line { animation: none; stroke-dashoffset: 0; }
  .sp-scroll span, .sp-badge-dot { animation: none; }
  .sp-tier-bar span { transition: none; width: calc(var(--n) / 8 * 100%); }
  * { scroll-behavior: auto !important; }
}