/* Сайт wyx.su в стиле «Мята» — цвета и формы те же, что в приложении
   (sux-chat-app/src/themes/mint/mint.css, ios-native/WYX/Theme/Theme.swift). */
:root {
  --bg: #F4F8F1;
  --bg2: #E3EDDB;
  --surface: #FFFFFF;
  --surface3: #EEF4EA;
  --surface4: #E2EBDB;
  --fg: #23463F;
  --title: #2F5B53;
  --ink: #2F5B53;
  --muted: #6F7A74;
  --subtle: #858E89;
  --primary: #2F5B53;
  --primary-fg: #FFFFFF;
  --accent: #C7F964;
  --accent-fg: #2F5B53;
  --deep: #345C54;
  --divider: #E3E7E0;
  --glass: rgba(244, 248, 241, 0.72);
  --shadow: 0 5px 11px rgba(0, 0, 0, 0.2);
  --radius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #222B27; --bg2: #1C2420; --surface: #2C3832; --surface3: #37453D; --surface4: #405046;
    --fg: #FFFFFF; --title: #FFFFFF; --ink: #C7F964; --muted: #BDBDBD; --subtle: #9AA59E;
    --primary: #C7F964; --primary-fg: #2F5B53; --divider: #3A4831;
    --glass: rgba(34, 43, 39, 0.72); --shadow: 0 5px 11px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  --bg: #222B27; --bg2: #1C2420; --surface: #2C3832; --surface3: #37453D; --surface4: #405046;
  --fg: #FFFFFF; --title: #FFFFFF; --ink: #C7F964; --muted: #BDBDBD; --subtle: #9AA59E;
  --primary: #C7F964; --primary-fg: #2F5B53; --divider: #3A4831;
  --glass: rgba(34, 43, 39, 0.72); --shadow: 0 5px 11px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
/* Градиент на html без fixed: на iOS Safari fixed-фон рвётся при прокрутке. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; min-height: 100%; background: linear-gradient(135deg, var(--bg) 0%, var(--bg2) 100%) no-repeat; background-color: var(--bg2); }
body {
  margin: 0; min-height: 100vh;
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.55; color: var(--fg);
  background: transparent;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1040px, 100% - 32px); margin: 0 auto; }

/* Стеклянная шапка: контент уходит под неё с размытием, как в приложении. */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
.top::after { content: ""; display: block; height: 1px; background: var(--divider); opacity: .7; }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--title); font-weight: 700; letter-spacing: .14em; font-size: 20px; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; flex: none; border-radius: 8px; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink); }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(52, 92, 84, .1); text-decoration: none; }
:root[data-theme="dark"] .nav a:hover, :root[data-theme="dark"] .nav a[aria-current="page"] { background: rgba(199, 249, 100, .1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav a:hover, :root:not([data-theme="light"]) .nav a[aria-current="page"] { background: rgba(199, 249, 100, .1); } }
@media (max-width: 560px) { .nav a.hide-sm { display: none; } }

/* Главная */
.hero { padding: 72px 0 40px; text-align: center; }
.hero .mark { width: 128px; height: 128px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .22)); }
.wordmark {
  display: inline-block; margin: 26px 0 4px; font-weight: 700; font-size: 56px; letter-spacing: .18em;
  color: var(--title); line-height: 1; position: relative; padding-bottom: 14px;
}
/* Подчёркивание — как в заставке: точка упрыгивает под буквы и вытягивается. */
.wordmark::after {
  content: ""; position: absolute; left: 50%; bottom: 0; height: 6px; width: 6px; border-radius: 3px;
  background: var(--deep); transform: translateX(-50%);
  animation: underline 1.1s cubic-bezier(.2, 1, .3, 1) .25s forwards;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wordmark::after { background: var(--accent); } }
:root[data-theme="dark"] .wordmark::after { background: var(--accent); }
@keyframes underline { to { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .wordmark::after { animation: none; width: 100%; } }
.hero h1 { margin: 10px 0 0; font-size: 22px; font-weight: 500; color: var(--title); }
.hero p.lead { max-width: 560px; margin: 14px auto 0; color: var(--muted); font-size: 17px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; box-shadow: var(--shadow); transition: transform .15s ease;
}
.pill:hover { text-decoration: none; transform: translateY(-1px); }
.pill.primary { background: var(--primary); color: var(--primary-fg); }
.pill.lime { background: var(--accent); color: var(--accent-fg); }
.pill.soft { background: var(--surface); color: var(--ink); }

section { padding: 36px 0; }
h2 { margin: 0 0 18px; font-size: 24px; font-weight: 600; color: var(--title); text-align: center; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 20px;
}
.card .ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--surface4); color: var(--ink);
}
.card .ico svg { width: 22px; height: 22px; }
.card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--title); }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.dl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1000px) { .dl { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .dl { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .dl { grid-template-columns: 1fr; } }
.dl .card { display: flex; flex-direction: column; }
.dl .card .links { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--surface4); color: var(--ink); font-size: 13.5px; font-weight: 600;
}
.chip:hover { text-decoration: none; background: var(--primary); color: var(--primary-fg); }
.ver { text-align: center; color: var(--subtle); font-size: 13.5px; margin-top: 16px; min-height: 1.4em; }

footer { padding: 40px 0 48px; color: var(--subtle); font-size: 13.5px; text-align: center; }
footer .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }

/* Документы */
.doc { padding: 36px 0 60px; }
.doc .card { max-width: 760px; margin: 0 auto; padding: 28px clamp(18px, 4vw, 40px) 34px; }
.doc-head { display: flex; align-items: flex-start; gap: 12px; }
.doc-head h1 { margin: 0; flex: 1; font-size: 26px; font-weight: 600; color: var(--title); line-height: 1.25; }
.lang { display: inline-flex; background: var(--surface4); border-radius: 999px; padding: 3px; flex: none; }
.lang button {
  border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--primary); color: var(--primary-fg); }
.doc .updated { color: var(--subtle); font-size: 13.5px; margin: 6px 0 18px; }
.doc .intro { font-size: 16px; }
.doc h2 { text-align: left; font-size: 18px; margin: 26px 0 8px; }
.doc p { margin: 0 0 10px; color: var(--muted); white-space: pre-line; }
.doc .switch { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--divider); font-size: 14.5px; }
[hidden] { display: none !important; }
