/* Sultan VPN — маркетинговый сайт */
:root {
  --bg: #0c0f14;
  --surface: #141a24;
  --text: #e8edf5;
  --muted: #8b98ab;
  --accent: #f4b942;
  --accent-dim: #c4922e;
  --border: #243044;
  --radius: 12px;
  --font: "DM Sans", system-ui, sans-serif;
  --header-nav-break: 768px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: max(5rem, env(safe-area-inset-bottom, 0px));
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 15, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo span {
  color: var(--accent);
}

nav.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}
nav.nav-main a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}
nav.nav-main a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #1a1205;
}
.btn-primary:hover {
  transform: translateY(-1px);
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 3.5rem 0 4rem;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(244, 185, 66, 0.12), transparent);
}

.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.hero .lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

section h2 {
  font-size: 1.5rem;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

.grid-2 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.pricing-compare-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  background: var(--surface);
}
.pricing-compare-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}
.pricing-compare-card .price-main {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.5rem;
}
.pricing-compare-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.price-footnote-ref {
  font-size: 0.55em;
  font-weight: 600;
  vertical-align: super;
  margin-left: 0.12em;
  text-decoration: none;
  color: var(--muted);
  line-height: 0;
}
.price-footnote-ref:hover {
  color: var(--accent);
}

.tariff-legal-note {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 42rem;
}
.tariff-legal-note a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.tariff-legal-note a:hover {
  color: var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.pricing-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
}
.price-tag {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}
.price-note {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Lists & docs */
.doc-list {
  padding-left: 1.25rem;
  color: var(--muted);
}
.doc-list li {
  margin-bottom: 0.5rem;
}

.server-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.server-table th,
.server-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.server-table th {
  color: var(--accent);
  font-weight: 600;
}

.note-box {
  background: rgba(244, 185, 66, 0.08);
  border: 1px solid rgba(244, 185, 66, 0.25);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

/* Страницы результата оплаты Stripe (/success, /cancel) */
.payment-result-section {
  padding: 2.5rem 0 4rem;
  min-height: 55vh;
  display: flex;
  align-items: center;
}
.payment-result-card {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.payment-result-card--success {
  border-color: rgba(74, 222, 128, 0.35);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.08);
}
.payment-result-card--cancel {
  border-color: rgba(148, 163, 184, 0.35);
}
.payment-result-icon {
  font-size: 2.75rem;
  line-height: 1;
  margin: 0 0 1rem;
}
.payment-result-card h1 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.payment-result-card .lead-muted {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
  line-height: 1.55;
}
.payment-result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}
.payment-result-actions .btn {
  justify-content: center;
}
.payment-result-countdown {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 1rem 0 0;
}

/* Footer */
.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  padding: 0 0.25rem;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin: 0 0 0.9rem;
  line-height: 1.55;
}

.site-footer-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-footer-nav a:hover {
  color: var(--accent);
  border-bottom-color: rgba(244, 185, 66, 0.45);
}

.site-footer-sep {
  color: var(--border);
  user-select: none;
  font-weight: 300;
}

.site-footer-terms {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 0.75rem;
  line-height: 1.5;
}

.site-footer-terms a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-footer-terms a:hover {
  color: var(--accent);
}

.site-footer-credit {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin: 0 auto;
  opacity: 0.92;
}

/* Горизонтальный скролл для широких таблиц на узком экране */
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.table-scroll .server-table {
  margin: 0;
  min-width: 520px;
}

/* Страница политики (www/pages/privacy.html) */
.privacy-doc {
  padding: 2rem 0 2.5rem;
}

.privacy-doc .card-doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  max-width: 920px;
  margin: 0 auto;
}

.privacy-doc h1 {
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.privacy-doc .muted {
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.privacy-doc h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.3;
}

.privacy-doc h3 {
  margin: 1rem 0 0.35rem;
  font-size: 1rem;
  color: var(--muted);
}

.privacy-doc p,
.privacy-doc li {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.privacy-doc ul {
  padding-left: 1.25rem;
}

.privacy-doc code {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
  font-size: 0.88em;
  word-break: break-word;
}

/* Заголовки внутренних страниц (не hero на главной) */
main h1 {
  font-size: clamp(1.35rem, 5vw, 1.9rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  word-break: break-word;
}

/* Динамическая страница «Поддержка» */
.support-page {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

.support-page .lead {
  color: var(--muted);
  max-width: 40rem;
}

.support-page .card .btn {
  max-width: 100%;
  box-sizing: border-box;
}

.support-card {
  max-width: 480px;
  margin-top: 1.5rem;
}

.support-note {
  max-width: 40rem;
  margin-top: 0;
}

.support-hint {
  color: var(--muted);
  margin-top: 2rem;
  max-width: 40rem;
  overflow-wrap: anywhere;
}

#home-community .card {
  max-width: 100%;
  box-sizing: border-box;
}

/* Внутренние страницы: отступ сверху и вводный абзац */
.page-section {
  padding-top: 2.5rem;
}

.page-intro {
  color: var(--muted);
  max-width: 42rem;
  overflow-wrap: anywhere;
}

.text-muted-block {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.howto-h2 {
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.howto-h2:first-of-type {
  margin-top: 2rem;
}

.page-nav-links {
  margin-top: 2rem;
  overflow-wrap: anywhere;
}

.page-actions {
  margin-top: 2rem;
}

.page-actions .btn-primary {
  width: 100%;
  max-width: 22rem;
}

/* Плавающая кнопка → Telegram */
.float-tg-btn {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #1a1205;
  background: linear-gradient(145deg, #f4b942, #d4a032);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(244, 185, 66, 0.35);
  text-decoration: none;
  touch-action: manipulation;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.float-tg-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  text-decoration: none;
  color: #1a1205;
}
.float-tg-btn__glyph {
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
}
.float-tg-btn__label {
  white-space: nowrap;
}

.btn-lg {
  padding: 0.75rem 1.35rem;
  font-size: 1rem;
}

/* Баннер «открыть бота» на главной */
.cta-bot-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(244, 185, 66, 0.1), rgba(20, 26, 36, 0.95));
}
.cta-bot-strip h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}
.cta-bot-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 28rem;
}

/* ---------- Адаптив: планшеты и телефоны ---------- */
@media (max-width: 768px) {
  .hero {
    padding: 2.25rem 0 2.5rem;
  }

  .hero h1 {
    font-size: clamp(1.45rem, 6vw, 2.1rem);
  }

  .hero .lead {
    font-size: 1rem;
  }

  section {
    padding: 2.25rem 0;
  }

  section h2 {
    font-size: clamp(1.2rem, 4vw, 1.45rem);
  }

  .grid-3 {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .card {
    padding: 1.1rem 1.15rem;
  }

  .site-header .inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.65rem 0;
  }

  .logo {
    text-align: center;
    font-size: 1.1rem;
  }

  nav.nav-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.45rem;
  }

  nav.nav-main a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 0.9rem;
    padding: 0.55rem 0.75rem;
    text-align: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
  }

  nav.nav-main a:hover {
    color: var(--text);
    border-color: var(--border);
  }

  nav.nav-main a.btn,
  nav.nav-main a.btn-primary {
    border: none;
    margin-top: 0.15rem;
    padding: 0.6rem 1rem;
  }

  nav.nav-main a.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #1a1205;
  }

  .cta-bot-strip {
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem 1.1rem;
    gap: 1rem;
  }

  .cta-bot-strip h2 {
    font-size: 1.1rem;
  }

  .cta-bot-strip .btn {
    width: 100%;
    text-align: center;
  }

  .note-box {
    font-size: 0.9rem;
    padding: 0.9rem 1rem;
    overflow-wrap: anywhere;
  }

  .server-table {
    font-size: 0.85rem;
  }

  .server-table th,
  .server-table td {
    padding: 0.5rem 0.55rem;
    vertical-align: top;
  }

  .privacy-doc .card-doc {
    padding: 1.25rem 1rem;
  }

  .support-card {
    max-width: 100%;
  }

  .support-note,
  .support-hint {
    max-width: 100%;
  }

  .page-section {
    padding-top: 1.75rem;
  }

  .page-actions .btn-primary {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .price-tag {
    font-size: 1.65rem;
  }

  .site-footer {
    padding: 1.5rem 0 5rem;
    font-size: 0.82rem;
  }

  .support-page {
    padding-top: 1.75rem;
  }

  .float-tg-btn__label {
    display: none;
  }

  .float-tg-btn {
    padding: 0.65rem;
    border-radius: 50%;
  }
}
