/* Telescope VPN — paywall gateway (pay.tscope.cc).
 * Light theme is the base; dark is the Telescope cosmic look
 * (palette from dekavpn-invite branding/telescope-brand.css). */

:root {
  color-scheme: light dark;
  --page: #f2f5fb;
  --surface: #ffffff;
  --surface-soft: #f6f8fc;
  --ink: #16233b;
  --muted: #5b6b83;
  --line: rgba(22, 40, 74, 0.12);
  --primary: #2f6fe4;
  --primary-press: #2a61c6;
  --primary-ink: #ffffff;
  --primary-glow: rgba(47, 111, 228, 0.28);
  --ok: #1f7a4d;
  --ok-bg: rgba(31, 122, 77, 0.12);
  --fail: #c23b3b;
  --fail-bg: rgba(194, 59, 59, 0.12);
  --wait: #5b6b83;
  --wait-bg: rgba(91, 107, 131, 0.14);
  --error-ink: #a13333;
  --focus: rgba(47, 111, 228, 0.55);
  --shadow: 0 20px 50px rgba(22, 40, 74, 0.10), 0 3px 10px rgba(22, 40, 74, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #020611;
    --surface: rgba(10, 25, 52, 0.88);
    --surface-soft: rgba(16, 34, 66, 0.65);
    --ink: #f5f8ff;
    --muted: #a6b5cb;
    --line: rgba(128, 206, 255, 0.16);
    --primary: #3f8ff2;
    --primary-press: #2f6fe4;
    --primary-ink: #f5f8ff;
    --primary-glow: rgba(63, 143, 242, 0.35);
    --ok: #59c98d;
    --ok-bg: rgba(89, 201, 141, 0.14);
    --fail: #ff7a7a;
    --fail-bg: rgba(255, 122, 122, 0.13);
    --wait: #a6b5cb;
    --wait-bg: rgba(166, 181, 203, 0.14);
    --error-ink: #ffb3b3;
    --focus: rgba(128, 206, 255, 0.6);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(128, 206, 255, 0.05);
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { background: var(--page); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Cosmic backdrop, dark theme only: a faint orbit glow and a few stars. */
@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(circle at 50% 22%, rgba(31, 112, 224, 0.16), transparent 26rem),
      radial-gradient(circle at 14% 84%, rgba(21, 96, 194, 0.08), transparent 22rem),
      radial-gradient(1px 1px at 12% 18%, rgba(245, 248, 255, 0.75), transparent 1px),
      radial-gradient(1px 1px at 78% 9%, rgba(245, 248, 255, 0.55), transparent 1px),
      radial-gradient(1.5px 1.5px at 88% 44%, rgba(215, 184, 121, 0.5), transparent 2px),
      radial-gradient(1px 1px at 30% 64%, rgba(245, 248, 255, 0.4), transparent 1px),
      radial-gradient(1px 1px at 62% 82%, rgba(128, 206, 255, 0.45), transparent 1px),
      radial-gradient(1.5px 1.5px at 44% 34%, rgba(245, 248, 255, 0.6), transparent 2px),
      var(--page);
    background-attachment: fixed;
  }
}

.page {
  display: flex;
  flex-direction: column;
  width: min(100%, 460px);
  min-height: 100dvh;
  margin-inline: auto;
  padding: max(22px, env(safe-area-inset-top)) clamp(18px, 5vw, 28px) max(26px, env(safe-area-inset-bottom));
}

/* --- Brand ------------------------------------------------------------- */

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  width: 27px;
  height: 27px;
  flex: none;
  color: var(--primary);
}

.wordmark {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}

.order-inline {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

/* --- Screens ----------------------------------------------------------- */

.stage {
  display: grid;
  flex: 1 0 auto;
  align-content: center;
  padding-block: 24px 40px;
}

.screen {
  animation: screen-in 260ms cubic-bezier(0.22, 1, 0.36, 1);
}


@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 220px;
  text-align: center;
}

.skeleton-line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  width: 26px;
  height: 26px;
  flex: none;
  border: 2.5px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 760ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- VPN hero: headline + one sentence, no box ------------------------- */

.hero {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.22;
}

.hero-text {
  margin: 0;
  max-width: 32ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.hero-text b { color: var(--ink); font-weight: 700; }

/* --- Actions / buttons ------------------------------------------------- */

.actions {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, opacity 140ms ease;
}

.button:active { transform: translateY(1px); }

.button-primary {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: 0 10px 22px var(--primary-glow);
}

.button-primary:active { background: var(--primary-press); }

.button-primary:disabled {
  cursor: default;
  opacity: 0.75;
  transform: none;
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button:focus-visible,
.support-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.button-spinner {
  width: 17px;
  height: 17px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--primary-ink);
  border-radius: 50%;
  animation: spin 760ms linear infinite;
}


.trust-line {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  text-align: center;
}

.inline-error {
  margin: 0;
  color: var(--error-ink);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}


.support-link {
  justify-self: center;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-link:active { color: var(--ink); }

/* --- Status screens ---------------------------------------------------- */

.status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.status-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
}

.status-icon svg { width: 26px; height: 26px; }

.status-icon-ok { background: var(--ok-bg); color: var(--ok); }
.status-icon-fail { background: var(--fail-bg); color: var(--fail); }
.status-icon-wait { background: var(--wait-bg); color: var(--wait); }

.status-title {
  margin: 4px 0 0;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.status-text {
  margin: 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}


/* --- Motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .spinner, .button-spinner { animation-duration: 1.4s !important; animation-iteration-count: infinite !important; }
}
