/**
 * WhyConnect — веб-страницы (оферта, политика, лендинг).
 * Отдаётся nginx как GET /legal.css (файл рядом с terms.html в volume).
 * Токены: vercel/DESIGN.md + vercel/preview.html (Geist, shadow-as-border).
 */

:root {
  --wc-bg: #ffffff;
  --wc-bg-subtle: #fafafa;
  --wc-fg: #171717;
  --wc-fg-muted: #4d4d4d;
  --wc-fg-tertiary: #666666;
  --wc-gray-100: #ebebeb;
  --wc-gray-400: #808080;
  --wc-link: #0072f5;
  --wc-focus: hsl(212, 100%, 48%);
  --wc-btn-fg-on-dark: #ffffff;
  --wc-shadow-ring: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  --wc-shadow-ring-light: rgb(235, 235, 235) 0px 0px 0px 1px;
  --wc-shadow-card: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px,
    rgba(0, 0, 0, 0.04) 0px 2px 2px 0px, rgb(250, 250, 250) 0px 0px 0px 1px;
  --wc-font-sans: "Geist", system-ui, -apple-system, Arial, sans-serif;
  --wc-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "Roboto Mono", Menlo, monospace;
  --wc-nav-bg: rgba(255, 255, 255, 0.85);
  --wc-table-head-bg: #171717;
  --wc-table-head-fg: #ffffff;
  --wc-table-stripe: #fafafa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --wc-bg: #0a0a0a;
    --wc-bg-subtle: #111111;
    --wc-fg: #ededed;
    --wc-fg-muted: #a0a0a0;
    --wc-fg-tertiary: #808080;
    --wc-gray-100: #2a2a2a;
    --wc-gray-400: #666666;
    --wc-btn-fg-on-dark: #0a0a0a;
    --wc-shadow-ring: rgba(255, 255, 255, 0.1) 0px 0px 0px 1px;
    --wc-shadow-ring-light: rgba(255, 255, 255, 0.08) 0px 0px 0px 1px;
    --wc-shadow-card: rgba(255, 255, 255, 0.1) 0px 0px 0px 1px,
      rgba(0, 0, 0, 0.2) 0px 2px 2px 0px, rgba(255, 255, 255, 0.03) 0px 0px 0px 1px;
    --wc-nav-bg: rgba(10, 10, 10, 0.88);
    --wc-table-head-bg: #ededed;
    --wc-table-head-fg: #0a0a0a;
    --wc-table-stripe: #141414;
  }
}

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

html {
  scroll-behavior: smooth;
}

body.wc-body {
  font-family: var(--wc-font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--wc-fg);
  background: var(--wc-bg-subtle);
  font-feature-settings: "liga" 1;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--wc-focus);
  outline-offset: 2px;
}

/* ——— Nav (как preview.html) ——— */
.wc-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px clamp(16px, 4vw, 32px);
  background: var(--wc-nav-bg);
  backdrop-filter: blur(12px);
  box-shadow: var(--wc-shadow-ring);
}

.wc-nav-brand {
  font-size: 14px;
  font-weight: 600;
  color: var(--wc-fg);
  text-decoration: none;
  letter-spacing: -0.28px;
}

.wc-nav-brand:hover {
  opacity: 0.85;
}

.wc-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wc-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--wc-fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.wc-nav-links a:hover {
  color: var(--wc-fg);
}

.wc-nav-links a[aria-current="page"] {
  color: var(--wc-fg);
  font-weight: 600;
  letter-spacing: -0.32px;
}

.wc-nav-cta {
  display: inline-block;
  background: var(--wc-fg);
  color: var(--wc-btn-fg-on-dark);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s;
}

.wc-nav-cta:hover {
  opacity: 0.85;
}

@media (max-width: 640px) {
  .wc-nav {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ——— Hero ——— */
.wc-hero {
  padding: clamp(48px, 12vw, 96px) clamp(16px, 4vw, 32px) clamp(40px, 8vw, 80px);
  text-align: center;
  background: var(--wc-bg);
}

.wc-hero-label {
  font-family: var(--wc-font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--wc-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.wc-hero-title {
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: clamp(-1.6px, -0.05em, -2.4px);
  color: var(--wc-fg);
  margin-bottom: 16px;
}

.wc-hero-sub {
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 400;
  line-height: 1.8;
  color: var(--wc-fg-muted);
  max-width: 36rem;
  margin: 0 auto;
}

.wc-divider {
  border: none;
  border-top: 1px solid var(--wc-gray-100);
  margin: 0;
}

/* ——— Main sheet (карточка документа) ——— */
.wc-sheet {
  max-width: 46rem;
  margin: clamp(24px, 5vw, 40px) auto clamp(48px, 8vw, 80px);
  padding: clamp(24px, 5vw, 40px) clamp(20px, 4vw, 40px);
  background: var(--wc-bg);
  border-radius: 8px;
  box-shadow: var(--wc-shadow-card);
}

.wc-sheet > p:first-of-type {
  font-size: 14px;
  color: var(--wc-fg-muted);
}

.wc-sheet h2 {
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: -0.96px;
  color: var(--wc-fg);
  margin: 2rem 0 0.5rem;
  padding-bottom: 0.5rem;
  box-shadow: 0 1px 0 0 var(--wc-gray-100);
}

.wc-sheet h2:first-of-type {
  margin-top: 1rem;
}

.wc-sheet h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.32px;
  color: var(--wc-fg);
  margin: 1.25rem 0 0.35rem;
}

.wc-sheet p {
  margin: 0.5rem 0;
  color: var(--wc-fg-muted);
  font-size: 16px;
  line-height: 1.56;
}

.wc-sheet strong {
  color: var(--wc-fg);
  font-weight: 600;
  letter-spacing: -0.32px;
}

.wc-sheet a {
  color: var(--wc-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wc-sheet a:hover {
  text-decoration-thickness: 2px;
}

.wc-sheet ol,
.wc-sheet ul {
  margin: 0.5rem 0 0.5rem 1.25rem;
  color: var(--wc-fg-muted);
}

.wc-sheet li {
  margin: 0.35rem 0;
  line-height: 1.56;
}

.wc-sheet table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 14px;
  box-shadow: var(--wc-shadow-ring);
  border-radius: 8px;
  overflow: hidden;
}

.wc-sheet th {
  text-align: left;
  font-weight: 600;
  padding: 10px 14px;
  background: var(--wc-table-head-bg);
  color: var(--wc-table-head-fg);
}

.wc-sheet td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--wc-gray-100);
}

.wc-sheet tbody tr:nth-child(even) td {
  background: var(--wc-table-stripe);
}

.wc-sheet .requisites td:first-child {
  font-weight: 600;
  color: var(--wc-fg-muted);
  width: 34%;
}

.wc-cta-row {
  text-align: center;
  margin-top: 2rem;
}

.wc-btn-primary {
  display: inline-block;
  background: var(--wc-fg);
  color: var(--wc-btn-fg-on-dark);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s;
}

.wc-btn-primary:hover {
  opacity: 0.85;
}

.wc-footnote {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--wc-fg-tertiary);
  margin-top: 2rem;
  padding-top: 1.5rem;
  box-shadow: 0 -1px 0 0 var(--wc-gray-100);
}

.wc-footnote a {
  color: var(--wc-link);
}

.wc-site-footer {
  padding: 32px clamp(16px, 4vw, 32px);
  text-align: center;
  font-size: 13px;
  color: var(--wc-fg-tertiary);
  border-top: 1px solid var(--wc-gray-100);
  background: var(--wc-bg);
}

/* ——— Минимальные страницы: /, /pay/done ——— */
.wc-page-minimal {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wc-mini-card {
  margin: auto;
  padding: clamp(24px, 5vw, 40px);
  max-width: 28rem;
  width: calc(100% - 32px);
  background: var(--wc-bg);
  border-radius: 8px;
  box-shadow: var(--wc-shadow-card);
}

.wc-mini-card h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.96px;
  line-height: 1.33;
  color: var(--wc-fg);
  margin-bottom: 12px;
}

.wc-mini-card p {
  font-size: 16px;
  line-height: 1.56;
  color: var(--wc-fg-muted);
  margin: 0.75rem 0;
}

.wc-mini-card .wc-muted-block {
  font-size: 14px;
  color: var(--wc-fg-tertiary);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  box-shadow: 0 -1px 0 0 var(--wc-gray-100);
}

.wc-mini-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wc-btn-ghost {
  display: inline-block;
  background: var(--wc-bg);
  color: var(--wc-fg);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--wc-shadow-ring-light);
  transition: box-shadow 0.15s;
}

.wc-btn-ghost:hover {
  box-shadow: var(--wc-shadow-ring);
}
