/* OGVPN — dark luxury minimalism. Чёрно-белая палитра, крупный читаемый текст, мягкие скругления. */
:root {
  --bg: #000;
  --surface: #0c0c0c;
  --surface-2: #151515;
  --line: #222;
  --line-2: #333;
  --text: #f5f5f5;
  --muted: #a8a8a8;
  --faint: #6b6b6b;
  --white: #fff;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --display: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 18px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
::selection { background: var(--white); color: #000; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 4px; transition: text-decoration-color .2s; }
a:hover { text-decoration-color: var(--text); }

/* ── шапка ── */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px clamp(16px, 4vw, 44px); border-bottom: 1px solid var(--line);
  position: sticky; top: env(safe-area-inset-top, 0px); background: rgba(0,0,0,.82);
  backdrop-filter: saturate(140%) blur(16px); -webkit-backdrop-filter: saturate(140%) blur(16px); z-index: 5;
}
.brand { font-family: var(--display); font-size: 28px; letter-spacing: .22em; text-decoration: none; }
nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
nav a, nav button.link {
  color: var(--muted); font-size: 16px; text-decoration: none; padding: 8px 14px; border-radius: 999px;
  transition: color .2s, background .2s;
}
nav a:hover, nav button.link:hover { color: var(--text); background: var(--surface-2); }

.wrap { width: 100%; max-width: 900px; margin: 0 auto; padding: clamp(28px, 6vw, 60px) 16px 64px; flex: 1; }
.foot { text-align: center; color: var(--faint); font-size: 14px; letter-spacing: .06em; padding: 30px 16px calc(30px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }

/* ── типографика ── */
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 5.5vw, 50px); line-height: 1.12; margin: 0 0 12px; }
h2 { font-size: 21px; font-weight: 600; margin: 0 0 18px; letter-spacing: .01em; }
.eyebrow { font-size: 14px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.muted { color: var(--muted); }
.big { font-family: var(--display); font-size: clamp(26px, 4vw, 34px); line-height: 1.25; margin: 6px 0; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 2px 7px; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.center { text-align: center; }
.small { font-size: 16px; }

/* ── блоки ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 38px); margin-bottom: 20px; }
.narrow { max-width: 480px; margin: clamp(10px, 4vh, 40px) auto; }
.hero { text-align: center; margin-bottom: 36px; }
.hero h1 { font-size: clamp(44px, 9vw, 72px); }
.hero p { color: var(--muted); font-size: 19px; max-width: 520px; margin: 12px auto 0; }
.rule { width: 56px; height: 1px; background: var(--text); margin: 22px auto; border: 0; }

/* ── формы ── */
label { display: block; font-size: 16px; color: var(--muted); margin: 22px 0 10px; }
input[type=email], input[type=text], input[type=number], textarea {
  width: 100%; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--surface-2); color: var(--text); font: 18px var(--sans); outline: none;
  transition: border-color .2s, background .2s;
}
input:focus, textarea:focus { border-color: var(--white); background: #1a1a1a; }
input::placeholder { color: var(--faint); }
textarea { font: 14px/1.6 var(--mono); min-height: 120px; resize: vertical; word-break: break-all; }
input.code { font: 400 36px var(--mono); letter-spacing: .45em; text-align: center; padding-left: calc(18px + .45em); }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 28px; border: 1px solid var(--white); border-radius: var(--r-md);
  background: var(--white); color: #000; font: 600 17px var(--sans); letter-spacing: .01em;
  cursor: pointer; transition: background .2s, color .2s, opacity .2s, transform .1s; text-decoration: none;
}
button:hover, .btn:hover { background: #e6e6e6; }
button:active, .btn:active { transform: scale(.985); }
.btn.secondary, button.secondary { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.secondary:hover, button.secondary:hover { border-color: var(--white); background: var(--surface-2); }
button.danger { background: transparent; color: var(--text); border-color: var(--line-2); }
button.danger:hover { background: var(--white); color: #000; border-color: var(--white); }
button[data-busy] { opacity: .45; pointer-events: none; }
button.link { background: none; border: 0; padding: 8px 14px; font-weight: 400; }
.full { width: 100%; margin-top: 26px; }
.inline { display: inline; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ── статусы ── */
.alert { border: 1px solid var(--line-2); background: var(--surface-2); padding: 16px 20px; margin: 0 0 20px; font-size: 17px; border-radius: var(--r-md); }
.alert.ok { border-color: var(--muted); }
.alert.bad { background: var(--white); color: #000; border-color: var(--white); }
.badge { display: inline-block; font-size: 14px; font-weight: 600; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--white); color: #000; border-color: var(--white); }

.sub { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }

/* ── устройства ── */
.devices { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.devices li { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.dev-name { font-size: 19px; font-weight: 500; }

/* ── выбор сервера ── */
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.server { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; margin: 0; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--text); font-size: 16px;
  transition: background .2s, border-color .2s, transform .15s; }
.server:hover { border-color: var(--line-2); transform: translateY(-1px); }
.server input { position: absolute; opacity: 0; pointer-events: none; }
.server:has(input:checked) { background: var(--white); color: #000; border-color: var(--white); }
.server:has(input:checked) .muted, .server:has(input:checked) .rec { color: #000; }
.server .flag { font-size: 30px; line-height: 1; }
.server .nm { font-size: 18px; font-weight: 500; }
.server .rec { font-size: 14px; color: var(--muted); }
.server.off { opacity: .35; cursor: not-allowed; }

/* ── ключ / QR ── */
.qr { display: flex; justify-content: center; padding: 20px; background: var(--white); max-width: 340px; margin: 22px auto 0; border-radius: var(--r-lg); }
.qr svg { width: 100%; height: auto; }

/* ── инструкции ── */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 20px 58px; font-size: 18px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 50%; font-family: var(--display); font-size: 20px; color: var(--text); }
.platforms { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.platforms label { margin: 0; padding: 12px 20px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; color: var(--muted); font-size: 16px; transition: background .2s, color .2s, border-color .2s; }
.platforms label:hover { color: var(--text); border-color: var(--line-2); }
.platforms input { position: absolute; opacity: 0; pointer-events: none; }
.platforms label:has(input:checked) { background: var(--white); color: #000; border-color: var(--white); }
.pf { display: none; }
.pf.on { display: block; }
.dl { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 28px; }
.faq p { margin: 0 0 22px; }
.faq b { font-weight: 600; font-size: 19px; }

/* ── главная ── */
.globe { display: block; max-width: 100%; height: auto; overflow: visible; }
.globe-wrap { display: flex; justify-content: center; margin: 0 auto 26px; }
.globe-wrap .globe { width: min(340px, 78vw); filter: drop-shadow(0 0 40px rgba(255,255,255,.07)); }
.globe-wrap.sm .globe { width: 150px; }
.hero-main { padding-top: 4px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 600px; margin: 0 auto 36px; }
.features div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 10px; text-align: center; }
.features b { display: block; font: 400 clamp(26px, 5vw, 34px) var(--display); }
.features span { font-size: 15px; color: var(--muted); }
.add-card { position: relative; overflow: hidden; }
.add-card > *:not(.globe-corner) { position: relative; }
.globe-corner { position: absolute; right: -60px; top: -60px; opacity: .2; pointer-events: none; }
.globe-corner .globe { width: 240px; }
@media (prefers-reduced-motion: reduce) { .globe animate, .globe animateMotion { display: none; } }

/* ── админка ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th { font-size: 14px; color: var(--muted); font-weight: 500; }
th, td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 20px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; font-size: 15px; color: var(--muted); }
.stat b { display: block; font: 400 32px var(--display); color: var(--text); margin-top: 6px; }

.confirm { position: fixed; inset: 0; background: rgba(0,0,0,.8); display: grid; place-items: center; padding: 16px; z-index: 10; backdrop-filter: blur(8px); }
.confirm .card { max-width: 420px; width: 100%; border-color: var(--line-2); }
[hidden] { display: none !important; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .top { padding-top: 12px; padding-bottom: 12px; }
  .brand { font-size: 24px; }
  nav a, nav button.link { padding: 6px 10px; font-size: 15px; }
  .devices li .row { width: 100%; justify-content: space-between; }
  .features { gap: 8px; }
  .globe-corner { display: none; }
  button, .btn { width: 100%; }
  .row form.inline, .row form.inline button { width: 100%; }
}
