/* ==========================================================================
   Корпоративная платформа — страница-заглушка
   Три темы через [data-theme]: dark (по умолчанию), light, gradient
   ========================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --maxw: 720px;
}

/* ------------------------------- ТЁМНАЯ ---------------------------------- */
html[data-theme="dark"] {
  --bg: #0d1117;
  --bg-2: #0a0e14;
  --ink: #e9edf4;
  --ink-soft: #9aa4b2;
  --card: rgba(23, 29, 40, 0.72);
  --card-brd: rgba(255, 255, 255, 0.08);
  --accent: #e7b23c;
  --accent-2: #f4d27a;
  --badge-bg: rgba(231, 178, 60, 0.12);
  --badge-ink: #f4d27a;
  --track: rgba(255, 255, 255, 0.09);
  --blob-1: #1d4ed8;
  --blob-2: #b8860b;
  --blob-3: #0e7490;
  --grid-ink: rgba(255, 255, 255, 0.035);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75);
}

/* ------------------------------- СВЕТЛАЯ --------------------------------- */
html[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-2: #e9edf5;
  --ink: #16223a;
  --ink-soft: #5a6a86;
  --card: rgba(255, 255, 255, 0.86);
  --card-brd: rgba(20, 40, 80, 0.09);
  --accent: #1e56d6;
  --accent-2: #3b82f6;
  --badge-bg: rgba(30, 86, 214, 0.09);
  --badge-ink: #1e56d6;
  --track: rgba(20, 40, 80, 0.1);
  --blob-1: #2563eb;
  --blob-2: #60a5fa;
  --blob-3: #38bdf8;
  --grid-ink: rgba(20, 40, 80, 0.04);
  --shadow: 0 30px 70px -34px rgba(30, 60, 120, 0.35);
}

/* ----------------------------- СИНЕ-ГРАДИЕНТ ----------------------------- */
html[data-theme="gradient"] {
  --bg: #1e1b4b;
  --bg-2: #312e81;
  --ink: #f2f4ff;
  --ink-soft: #c3c8ee;
  --card: rgba(255, 255, 255, 0.1);
  --card-brd: rgba(255, 255, 255, 0.18);
  --accent: #a5b4fc;
  --accent-2: #e0e7ff;
  --badge-bg: rgba(255, 255, 255, 0.14);
  --badge-ink: #e0e7ff;
  --track: rgba(255, 255, 255, 0.16);
  --blob-1: #6366f1;
  --blob-2: #22d3ee;
  --blob-3: #a855f7;
  --grid-ink: rgba(255, 255, 255, 0.05);
  --shadow: 0 30px 80px -30px rgba(10, 5, 40, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s ease, color 0.5s ease;
}

html[data-theme="gradient"] body {
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 55%, #0f172a 100%);
}

/* --------------------------------- ФОН ---------------------------------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }

.blob {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.blob-1 { background: var(--blob-1); top: -14vmax; left: -10vmax; animation: drift1 22s ease-in-out infinite; }
.blob-2 { background: var(--blob-2); bottom: -16vmax; right: -12vmax; animation: drift2 26s ease-in-out infinite; }
.blob-3 { background: var(--blob-3); top: 30%; left: 40%; opacity: 0.35; animation: drift3 30s ease-in-out infinite; }

html[data-theme="light"] .blob { opacity: 0.28; }

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-ink) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%);
}

@keyframes drift1 { 50% { transform: translate(8vmax, 6vmax) scale(1.1); } }
@keyframes drift2 { 50% { transform: translate(-7vmax, -5vmax) scale(1.08); } }
@keyframes drift3 { 50% { transform: translate(-6vmax, 7vmax) scale(0.92); } }

/* ---------------------------- ПЕРЕКЛЮЧАТЕЛЬ ------------------------------ */
.theme-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--card-brd);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.theme-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.theme-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.theme-btn.is-active { opacity: 1; background: var(--badge-bg); }

/* --------------------------------- КАРТА -------------------------------- */
.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--card-brd);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 52px);
  text-align: center;
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: 18px;
}
.mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: var(--accent);
  background: var(--badge-bg);
  border: 1px solid var(--card-brd);
}
.brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.title {
  font-size: clamp(28px, 5.4vw, 46px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.lead {
  font-size: clamp(15px, 2.4vw, 18px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto 34px;
}

/* ------------------------------ ПЛИТКИ ---------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  border-radius: 15px;
  background: var(--badge-bg);
  border: 1px solid var(--card-brd);
  transition: transform 0.25s ease;
}
.feature:hover { transform: translateY(-3px); }
.feature-ic {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  color: var(--accent);
  background: var(--card);
  border: 1px solid var(--card-brd);
}
.feature-txt { display: flex; flex-direction: column; gap: 3px; }
.feature-txt b { font-size: 14px; font-weight: 600; }
.feature-txt span { font-size: 12px; line-height: 1.4; color: var(--ink-soft); }

/* ----------------------------- ПРОГРЕСС --------------------------------- */
.progress-wrap { text-align: left; }
.progress-head {
  display: flex;
  justify-content: center;
  align-items: baseline;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

/* Анимированное троеточие после подписи */
.ellipsis i {
  display: inline-block;
  opacity: 0.25;
  animation: dots 1.4s infinite;
}
.ellipsis i:nth-child(2) { animation-delay: 0.2s; }
.ellipsis i:nth-child(3) { animation-delay: 0.4s; }
@keyframes dots { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* Бесконечный «переливающийся» индикатор — без процентов */
.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent-2) 25%,
    var(--accent) 50%,
    var(--accent-2) 75%,
    var(--accent) 100%
  );
  background-size: 200% 100%;
  animation: flow 3.2s ease-in-out infinite;
}
/* Бегущий световой блик поверх */
.progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: sheen 2.6s ease-in-out infinite;
}
@keyframes flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes sheen {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* ------------------------------ ПОДВАЛ ---------------------------------- */
.foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  opacity: 0.8;
  flex-wrap: wrap;
  justify-content: center;
}
.foot .sep { opacity: 0.5; }

/* ----------------------------- АДАПТИВ ---------------------------------- */
@media (max-width: 540px) {
  .features { grid-template-columns: 1fr; }
  .feature { flex-direction: row; text-align: left; justify-content: flex-start; }
  .theme-switch { top: 14px; right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .dot, .card,
  .progress-bar, .progress-bar::after, .ellipsis i { animation: none !important; }
  .ellipsis i { opacity: 0.6; }
}
