:root {
  --bg: #f6efe3;
  --bg-deep: #efe2cf;
  --surface: rgba(255, 251, 245, 0.84);
  --surface-strong: rgba(255, 248, 239, 0.96);
  --surface-dark: #1f2328;
  --text: #1b1f23;
  --muted: #5d635f;
  --line: rgba(33, 38, 45, 0.12);
  --brand: #ee6c2d;
  --brand-deep: #ca4f12;
  --accent: #0f8b8d;
  --gold: #cc9b2a;
  --success: #2f8f58;
  --danger: #b9483b;
  --shadow-lg: 0 28px 90px rgba(53, 34, 14, 0.14);
  --shadow-md: 0 16px 50px rgba(53, 34, 14, 0.1);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(238, 108, 45, 0.12), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(15, 139, 141, 0.16), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, #f8f2e8 45%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

.page-glow {
  position: fixed;
  inset: auto;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
  z-index: -3;
}

.page-glow-a {
  top: -8rem;
  left: -8rem;
  background: #ee6c2d;
}

.page-glow-b {
  right: -10rem;
  top: 10rem;
  background: #0f8b8d;
}

.page-grid {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(33, 38, 45, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 38, 45, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 92%);
}

#site-header,
#site-footer,
#site-main {
  position: relative;
  z-index: 1;
}

.container {
  width: min(calc(100% - 32px), var(--content));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 18px 0;
  backdrop-filter: blur(20px);
  background: linear-gradient(180deg, rgba(246, 239, 227, 0.94), rgba(246, 239, 227, 0.68));
  border-bottom: 1px solid rgba(27, 31, 35, 0.06);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, #f5b14d, #ee6c2d 46%, #0f8b8d 100%);
  color: white;
  font-size: 22px;
  box-shadow: var(--shadow-md);
}

.brand-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.84rem;
  color: var(--muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.locale-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(33, 38, 45, 0.08);
}

.locale-button {
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.locale-button.is-active {
  background: linear-gradient(135deg, rgba(238, 108, 45, 0.16), rgba(15, 139, 141, 0.12));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(33, 38, 45, 0.06);
}

.nav-link,
.ghost-button,
.primary-button,
.soft-button,
.danger-button,
.chip,
.tab-button {
  border-radius: 999px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.nav-link,
.ghost-button,
.soft-button,
.tab-button {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(33, 38, 45, 0.08);
  color: var(--text);
}

.nav-link:hover,
.ghost-button:hover,
.soft-button:hover,
.primary-button:hover,
.danger-button:hover,
.tab-button:hover {
  transform: translateY(-1px);
}

.primary-button,
.danger-button {
  padding: 13px 18px;
  color: white;
  box-shadow: var(--shadow-md);
}

.primary-button {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.danger-button {
  background: linear-gradient(135deg, #d65f51, #b9483b);
}

.soft-button {
  background: rgba(15, 139, 141, 0.08);
  color: var(--accent);
  border-color: rgba(15, 139, 141, 0.15);
}

.hero {
  padding: 56px 0 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.surface-card,
.dashboard-shell,
.section-panel,
.legal-panel,
.auth-panel {
  border: 1px solid rgba(33, 38, 45, 0.08);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.hero-copy {
  padding: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(27, 31, 35, 0.06);
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-title,
.section-title,
.dashboard-title,
.auth-title {
  font-family: "Space Grotesk", sans-serif;
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-title {
  margin: 20px 0 18px;
  font-size: clamp(3.1rem, 8vw, 5.8rem);
}

.hero-lead,
.section-lead {
  max-width: 44rem;
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-grid,
.mini-grid,
.summary-grid,
.plans-grid,
.feature-grid,
.faq-grid,
.dashboard-cards,
.subscription-grid,
.payment-grid,
.history-grid,
.wholesale-grid,
.tier-grid {
  display: grid;
  gap: 18px;
}

.stat-grid {
  margin-top: 28px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card,
.mini-card,
.summary-card,
.plan-card,
.feature-card,
.faq-card,
.data-card,
.subscription-card,
.payment-card,
.history-card,
.tier-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid rgba(33, 38, 45, 0.08);
}

.stat-value,
.summary-value,
.data-value {
  display: block;
  margin-top: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.hero-panel {
  padding: 26px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 239, 0.85)),
    radial-gradient(circle at top right, rgba(238, 108, 45, 0.2), transparent 35%);
}

.hero-panel .terminal {
  margin-top: 16px;
  padding: 18px;
  border-radius: 24px;
  background: #1e2227;
  color: #f4f0eb;
  font-size: 0.94rem;
  line-height: 1.7;
  overflow-x: auto;
}

.section {
  padding: 26px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 18px;
}

.section-title,
.dashboard-title,
.auth-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.plans-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-card.highlighted {
  transform: rotate(-1deg);
  background:
    linear-gradient(180deg, rgba(255, 246, 236, 0.96), rgba(255, 251, 245, 0.92));
  box-shadow: 0 22px 54px rgba(202, 79, 18, 0.12);
}

.plan-header,
.card-header,
.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-icon,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chip {
  padding: 8px 12px;
  background: rgba(27, 31, 35, 0.06);
  color: var(--muted);
  font-size: 0.86rem;
}

.plan-price {
  margin: 18px 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
}

.plan-list,
.inline-list,
.detail-list,
.metric-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.plan-list li,
.inline-list li,
.detail-list li,
.metric-list li {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(27, 31, 35, 0.04);
}

.feature-grid,
.faq-grid,
.dashboard-cards,
.subscription-grid,
.payment-grid,
.history-grid,
.wholesale-grid,
.tier-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-shell {
  margin: 34px auto 46px;
  padding: 20px;
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.tab-button.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: white;
  box-shadow: var(--shadow-md);
}

.dashboard-grid {
  display: grid;
  gap: 18px;
}

.data-card pre,
.terminal,
.code-block {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.code-block,
.inline-code {
  padding: 14px 16px;
  border-radius: 18px;
  background: #1e2227;
  color: #f4f0eb;
  overflow-x: auto;
}

.inline-code {
  display: block;
  white-space: pre-wrap;
  word-break: break-all;
}

.field-grid,
.form-grid {
  display: grid;
  gap: 14px;
}

.field-grid.two,
.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(33, 38, 45, 0.1);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  outline: none;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(15, 139, 141, 0.5);
  box-shadow: 0 0 0 4px rgba(15, 139, 141, 0.12);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.auth-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 28px;
  padding: 48px 0;
  align-items: start;
}

.auth-panel {
  padding: 28px;
}

.auth-title {
  margin-bottom: 12px;
}

.auth-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(33, 38, 45, 0.12);
}

.telegram-login-slot {
  display: grid;
  gap: 12px;
  padding: 18px;
  margin-top: 8px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(33, 38, 45, 0.08);
}

.telegram-login-shell {
  min-height: 40px;
}

.auth-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-panel,
.section-panel {
  padding: 28px;
}

.footer {
  padding: 28px 0 40px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 0;
  color: var(--muted);
}

.empty-state {
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(33, 38, 45, 0.2);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.46);
}

.toast-root {
  position: fixed;
  top: 20px;
  right: 20px;
  display: grid;
  gap: 10px;
  z-index: 90;
}

.toast {
  min-width: 280px;
  max-width: 420px;
  padding: 16px 18px;
  border-radius: 20px;
  color: white;
  box-shadow: var(--shadow-lg);
}

.toast.success {
  background: linear-gradient(135deg, #2f8f58, #226740);
}

.toast.error {
  background: linear-gradient(135deg, #c14d3f, #92372d);
}

.toast.info {
  background: linear-gradient(135deg, #0f8b8d, #0b6466);
}

.pill-row,
.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.section-anchor {
  scroll-margin-top: 110px;
}

.hidden {
  display: none !important;
}

.noscript {
  padding: 18px;
  background: #1f2328;
  color: white;
  text-align: center;
}

@media (max-width: 1080px) {
  .hero-grid,
  .auth-wrap,
  .plans-grid,
  .feature-grid,
  .faq-grid,
  .dashboard-cards,
  .subscription-grid,
  .payment-grid,
  .history-grid,
  .wholesale-grid,
  .tier-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 14px 0;
  }

  .header-row,
  .dashboard-head,
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-copy,
  .hero-panel,
  .dashboard-shell,
  .section-panel,
  .legal-panel,
  .auth-panel {
    padding: 22px;
  }

  .field-grid.two,
  .form-grid.two,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .toast-root {
    top: auto;
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}
