/* ═══════════════════════════════════════════════════════════════════════════
   Lolly-pop.net — landing styles
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;
  --bg:           #0a0a0a;
  --surface:      #111111;
  --surface-2:    #1a1a1a;
  --border:       rgba(255, 255, 255, 0.08);
  --border-md:    rgba(255, 255, 255, 0.14);
  --text:         #f0efed;
  --muted:        #888888;
  --muted-2:      #555555;
  --accent:       #2df2c8;
  --accent-dim:   rgba(45, 242, 200, 0.12);
  --danger:       #ff6b7a;
  --ok:           #2df2c8;
  --lemon:        #ffe66d;
  /* compat aliases */
  --mint:         #2df2c8;
  --line:         rgba(255, 255, 255, 0.08);
  --panel:        rgba(255, 255, 255, 0.06);
  --pink:         #ff4fa3;
  --berry:        #8c5cff;
  --bg-soft:      #111111;

  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:not(.button):hover { color: var(--accent); }

/* кнопки-ссылки не должны менять цвет текста при hover */
a.button { color: inherit; }
a.button-primary        { color: #0a0a0a; }
a.button-primary:hover  { color: #0a0a0a; opacity: 0.9; }
a.button-secondary:hover { color: var(--text); opacity: 1; }

img { display: block; max-width: 100%; }
code { font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace; font-size: 0.9em; color: var(--accent); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1.4rem;
  font: 700 0.95rem/1 inherit;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 180ms, transform 120ms;
  white-space: nowrap;
}

.button:hover  { opacity: 0.88; }
.button:active { transform: scale(0.97); }

.button-primary {
  color: #0a0a0a;
  background: var(--accent);
  forced-color-adjust: none;
  -webkit-text-fill-color: #0a0a0a;
}

.button-secondary {
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-md);
}
.button-secondary:hover { background: #222; color: var(--text); opacity: 1; }

.btn-sm  { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
.btn-nav { padding: 0.55rem 1rem;  font-size: 0.875rem; }

/* ── HEADER ───────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-md);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  flex: 1;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms;
}
.nav a:hover { color: var(--text); }

/* ── LANG PICKER ──────────────────────────────────────────────────────────── */

.lang-picker {
  position: relative;
  flex-shrink: 0;
}

.lang-picker-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  color: var(--muted);
  font: 600 0.78rem/1 inherit;
  cursor: pointer;
  transition: border-color 150ms, color 150ms;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.lang-picker-btn:hover { border-color: var(--border-md); color: var(--text); }

.lang-picker-flag { font-size: 1rem; line-height: 1; }

.lang-picker-chevron {
  transition: transform 200ms;
  flex-shrink: 0;
}

.lang-picker-btn[aria-expanded="true"] .lang-picker-chevron {
  transform: rotate(180deg);
}

.lang-picker-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 100;
  min-width: 11rem;
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: 10px;
  padding: 0.35rem;
  margin: 0;
  list-style: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.lang-picker-dropdown.is-open { display: block; }

.lang-picker-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
  transition: background 120ms, color 120ms;
}

.lang-picker-option:hover { background: var(--surface-2); color: var(--text); }

.lang-picker-option.is-selected {
  color: var(--text);
  background: var(--accent-dim);
}

/* ── LANG NOTICE ──────────────────────────────────────────────────────────── */

.lang-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: var(--accent-dim);
  border-bottom: 1px solid rgba(45,242,200,0.2);
  font-size: 0.82rem;
  color: var(--accent);
  text-align: center;
}

.lang-notice-icon { font-size: 1rem; }

/* ── SECTIONS ─────────────────────────────────────────────────────────────── */

.section {
  padding: clamp(4rem, 8vw, 6rem) clamp(1rem, 6vw, 5rem);
  max-width: 1200px;
  margin: 0 auto;
}

.section-heading-row {
  margin-bottom: 3rem;
}

.section-heading-row h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.15;
  font-weight: 800;
}

.section-sub {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
  font-size: 1rem;
  line-height: 1.6;
}

/* ── REVEAL ───────────────────────────────────────────────────────────────── */

.reveal-section {
  opacity: 0;
  transition: opacity 600ms ease;
}

.reveal-section.is-visible {
  opacity: 1;
}

/* ── HERO ─────────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  min-height: calc(100vh - 4rem);
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 6vw, 5rem);
  max-width: 1200px;
  margin: 0 auto;
}

.hero-text { max-width: 40rem; }

.hero-text h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-copy {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 44ch;
}

.hero-actions { margin-bottom: 1.25rem; }

.hero-login {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.hero-login a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.hero-login a:hover { color: var(--accent); }

/* Chat mockup */
.hero-mockup {
  display: flex;
  justify-content: center;
}

.chat-card {
  display: flex;
  width: 100%;
  max-width: 420px;
  min-height: 280px;
  border: 1px solid var(--border-md);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
}

.chat-sidebar {
  width: 130px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 1rem 0.5rem;
  background: rgba(0,0,0,0.2);
}

.chat-server-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0.5rem 0.75rem;
}

.chat-room-list { display: flex; flex-direction: column; gap: 2px; }

.chat-room {
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: default;
  transition: background 150ms;
}

.chat-room.is-active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.chat-topbar {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 700;
}

.chat-room-name { color: var(--text); }

.chat-messages {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.chat-msg-own { justify-content: flex-end; align-items: flex-start; }

.chat-bubble-wrap-own { align-items: flex-end; }
.chat-name-own { text-align: right; }
.chat-avatar-self { background: rgba(45,242,200,0.15); color: var(--accent); border-color: rgba(45,242,200,0.3); }

.chat-avatar {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--muted);
}

.chat-avatar-mod { background: rgba(45,242,200,0.15); color: var(--accent); border-color: rgba(45,242,200,0.3); }

.chat-bubble-wrap { display: flex; flex-direction: column; gap: 0.2rem; max-width: 180px; }
.chat-name { font-size: 0.72rem; font-weight: 600; color: var(--muted); }

.chat-bubble {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
}

.chat-bubble-own {
  background: rgba(45,242,200,0.15);
  border-color: rgba(45,242,200,0.25);
  color: #e0faf5;
  max-width: 200px;
}

.chat-delivered {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0.7;
}

/* ── ПОЧЕМУ МЫ ────────────────────────────────────────────────────────────── */

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.why-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  transition: border-color 200ms;
}

.why-card:hover { border-color: var(--border-md); }

.why-icon {
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1.1rem;
  color: var(--accent);
}

.why-icon svg { width: 100%; height: 100%; }

.why-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  font-weight: 700;
}

.why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ── WHY-COMM ─────────────────────────────────────────────────────────────── */

.why-comm {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 1.25rem;
  padding: 1.75rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 200ms;
}

.why-comm:hover { border-color: var(--border-md); }

.why-comm-icons {
  display: flex;
  gap: 0.85rem;
  flex-shrink: 0;
}

.why-comm-icon {
  width: 2.2rem;
  height: 2.2rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-comm-icon svg { width: 100%; height: 100%; }

.why-comm-text h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 700;
}

.why-comm-text p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ── КАК ЭТО РАБОТАЕТ ────────────────────────────────────────────────────── */

.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.step-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.step-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted-2);
  letter-spacing: 0.06em;
}

.step-icon {
  width: 2rem;
  height: 2rem;
  color: var(--accent);
}

.step-icon svg { width: 100%; height: 100%; }

.step-card h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.step-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.step-time {
  margin-top: auto;
  font-size: 0.78rem;
  color: var(--muted-2);
  font-weight: 600;
}

/* ── ПЛАТФОРМЫ ────────────────────────────────────────────────────────────── */

.platform-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.platform-tab {
  border: 1px solid var(--border-md);
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  background: transparent;
  color: var(--muted);
  font: 600 0.875rem/1 inherit;
  cursor: pointer;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.platform-tab:hover { background: var(--surface-2); color: var(--text); }

.platform-tab.is-active {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-md);
}

.platform-walkthrough { display: none; }
.platform-walkthrough.is-active { display: block; }

.platform-download {
  display: inline-flex;
  margin-bottom: 1.5rem;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.install-step {
  border-bottom: 1px solid var(--border);
}

.install-step:last-child { border-bottom: 0; }

.install-step summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  user-select: none;
  transition: background 150ms;
}

.install-step summary::-webkit-details-marker { display: none; }
.install-step summary:hover { background: rgba(255,255,255,0.04); }

.install-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.install-body {
  padding: 0.75rem 1.25rem 1.25rem 3.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.install-body p { margin: 0; }

/* Store mockup */
.store-mockup {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 340px;
}

.store-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.store-search svg { width: 14px; height: 14px; flex-shrink: 0; }

.store-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.store-app-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a1a2e, #2df2c8);
  flex-shrink: 0;
}

.store-app-info { flex: 1; }
.store-app-info strong { display: block; font-size: 0.85rem; }
.store-app-info span  { font-size: 0.75rem; color: var(--muted); }

.store-dl-btn {
  background: var(--accent);
  color: #0a0a0a;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── ДОВЕРИЕ ──────────────────────────────────────────────────────────────── */

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.trust-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  background: var(--surface);
}

.trust-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 0.1rem;
}

.trust-icon svg { width: 100%; height: 100%; }

.trust-card h3 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.trust-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

.trust-operator {
  margin-top: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
}

.trust-operator-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  color: var(--accent);
}

.trust-operator-icon svg { width: 100%; height: 100%; }

.trust-operator h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.trust-operator p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.trust-link {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── ПУБЛИЧНЫЕ КОМНАТЫ ────────────────────────────────────────────────────── */

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.room-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  background: var(--surface);
}

.room-card strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.room-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.room-count {
  font-size: 0.8rem;
  color: var(--muted-2);
  font-weight: 600;
}

.room-card .button { margin-top: 0.5rem; align-self: flex-start; }

.rooms-cta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.rooms-cta a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── РЕГИСТРАЦИЯ ──────────────────────────────────────────────────────────── */

.register-section {
  scroll-margin-top: 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6rem) clamp(1rem, 6vw, 5rem);
}

.register-text h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
}

.register-text p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 40ch;
}

.register-note {
  font-size: 0.875rem !important;
  color: var(--muted-2) !important;
  font-weight: 600;
}

.register-card {
  border: 1px solid var(--border-md);
  border-radius: 14px;
  padding: 2rem;
  background: var(--surface);
}

/* ── REGISTRATION FORM ELEMENTS ───────────────────────────────────────────── */

.register-form {
  display: grid;
  gap: 1.1rem;
}

.form-field {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-field span:first-child { color: var(--text); font-size: 0.875rem; }

.register-form input[type="text"],
.register-form input[type="email"],
.register-form input[type="password"] {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--border-md);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  background: rgba(0,0,0,0.3);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 150ms;
}

.register-form input:focus { border-color: var(--accent); }
.register-form input.is-valid   { border-color: var(--ok); }
.register-form input.is-invalid { border-color: var(--danger); }

.username-start-control {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  border: 1px solid var(--border-md);
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
  overflow: hidden;
  transition: border-color 150ms;
}

.username-start-control:focus-within { border-color: var(--accent); }

.username-start-control > span:first-child {
  padding: 0 0.6rem 0 0.9rem;
  color: var(--accent);
  font-weight: 900;
  font-size: 1rem;
  user-select: none;
}

.username-start-control input {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem 0.65rem 0;
}

.username-start-control input:focus { border: 0 !important; }

.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
  margin-top: 0.1rem;
}

.form-message {
  min-height: 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.35;
}

.form-message.is-error { color: var(--danger); }
.form-message.is-ok    { color: var(--ok); }

/* ── PASSWORD STRENGTH ────────────────────────────────────────────────────── */

.password-strength {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.password-strength span {
  height: 0.3rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
}

.password-strength[data-strength="1"] span:nth-child(-n+1) { background: #ff5c6f; }
.password-strength[data-strength="2"] span:nth-child(-n+2) { background: #ff9f43; }
.password-strength[data-strength="3"] span:nth-child(-n+3) { background: #ffe66d; }
.password-strength[data-strength="4"] span:nth-child(-n+4) { background: #2df2c8; }

/* ── CHECKBOXES ───────────────────────────────────────────────────────────── */

.rules-accept {
  display: grid;
  gap: 0.65rem;
}

.checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
}

.checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.field-error {
  min-height: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--danger);
  line-height: 1.35;
}

/* ── INLINE LINK ──────────────────────────────────────────────────────────── */

.inline-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inline-link:hover { opacity: 0.8; }

/* ── TURNSTILE ────────────────────────────────────────────────────────────── */

.turnstile-widget {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border-md);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}

/* ── REGISTRATION SUCCESS ─────────────────────────────────────────────────── */

#register-success { display: grid; gap: 1rem; }
#register-success[hidden] { display: none; }

.register-success-icon {
  font-size: 2.5rem;
  color: var(--ok);
  line-height: 1;
}

#register-success h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
}

#register-success p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.register-progress {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.progress-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border-md);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.progress-step-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.progress-step.is-done {
  border-color: rgba(45, 242, 200, 0.35);
  color: var(--ok);
}

.progress-step.is-pending {
  border-color: rgba(255, 230, 109, 0.35);
  color: var(--lemon);
}

.progress-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 230, 109, 0.3);
  border-top-color: var(--lemon);
  border-radius: 50%;
  flex-shrink: 0;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.progress-sep {
  color: var(--muted-2);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── FAQ ──────────────────────────────────────────────────────────────────── */

#faq h2 {
  margin: 0 0 2rem;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.faq-list details[open] { border-color: var(--border-md); }

.faq-list summary {
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 150ms;
}

.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--muted); font-size: 1.1rem; font-weight: 400; transition: transform 200ms; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { background: rgba(255,255,255,0.03); }

.faq-list p {
  margin: 0;
  padding: 0 1.25rem 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.faq-list a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ── FOOTER ───────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.4);
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 6vw, 5rem) 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand-col .brand {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.footer-desc {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 28ch;
}

.footer-credit {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-credit a { color: var(--muted-2); text-decoration: underline; text-underline-offset: 2px; }
.footer-credit a:hover { color: var(--accent); }

.footer-since {
  font-size: 0.75rem;
  color: var(--muted-2);
  opacity: 0.7;
  white-space: nowrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col h4 {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms;
}

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

/* ── MODALS ───────────────────────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  border: 1px solid var(--border-md);
  border-radius: 16px;
  background: #111;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(8px);
  transition: transform 200ms ease;
  box-shadow: 0 32px 64px rgba(0,0,0,0.6);
}

.modal.is-open .modal-dialog { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms;
}

.modal-close:hover { background: rgba(255,255,255,0.15); }

.registration-modal-header {
  padding: 1.75rem 1.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.registration-modal-header h2 { margin: 0 0 0.4rem; font-size: 1.25rem; font-weight: 800; }
.registration-modal-header p  { margin: 0; font-size: 0.875rem; color: var(--muted); }

.modal-body {
  overflow-y: auto;
  padding: 1.5rem 1.75rem 1.75rem;
  flex: 1;
}

.modal-body h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--text);
}

.modal-body p  { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.9rem; line-height: 1.65; }
.modal-body ul { margin: 0 0 0.75rem; padding-left: 1.25rem; color: var(--muted); font-size: 0.9rem; line-height: 1.65; }
.modal-body li { margin-bottom: 0.35rem; }

.registration-modal-body { padding-top: 1.25rem; }

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── FIELD TOOLTIP ────────────────────────────────────────────────────────── */

.field-tooltip {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  opacity: 0;
  max-width: min(18rem, calc(100vw - 2rem));
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  background: rgba(10,10,10,0.95);
  border: 1px solid var(--border-md);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  transition: opacity 120ms;
}

.field-tooltip.is-visible { opacity: 1; }

/* ── MODAL REGISTER FORM OVERRIDES ───────────────────────────────────────── */

.modal-register-form .form-hint {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.inline-link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inline-link-btn:hover { opacity: 0.8; }

.modal-register-form .field-error {
  min-height: 1rem;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ── INSTALL STEPS HORIZONTAL ────────────────────────────────────────────── */

.install-steps-h {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.install-step-h {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.install-h-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.install-h-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  flex-shrink: 0;
}

.install-step-h h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.install-step-h p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.install-step-h p a { color: var(--accent); }

/* Store mini mockup */
.store-mini {
  width: 100%;
  background: #1c1c1e;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 0.75rem;
}

.ios-store .store-mini-bar { background: #2c2c2e; }
.android-store .store-mini-bar { background: #1e2a20; }

.store-mini-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.store-mini-bar svg { width: 11px; height: 11px; flex-shrink: 0; }

.store-mini-result {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
}

.element-icon-sm {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 7px;
  overflow: hidden;
}

.element-icon-sm svg { width: 100%; height: 100%; }

.store-mini-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.store-mini-info strong {
  font-size: 0.72rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-mini-info span {
  font-size: 0.65rem;
  color: var(--muted);
}

.store-get-link {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent) !important;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.store-get-link:hover { opacity: 0.85; }

/* Install icon visual */
.install-icon-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.element-icon-md {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
}

.element-icon-md svg { width: 100%; height: 100%; }

.install-arrow { width: 18px; height: 18px; color: var(--muted); }

.install-icon-label {
  font-size: 0.7rem;
  color: var(--muted);
}

/* Server address visual */
.server-visual {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.server-visual-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.server-visual-value {
  font-size: 0.75rem;
  font-family: ui-monospace, "Cascadia Code", "Fira Mono", monospace;
  color: var(--accent);
  word-break: break-all;
}

/* Login fields visual */
.login-visual {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-field-mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.login-field-pass { letter-spacing: 0.1em; color: var(--muted-2); }

.login-btn-mock {
  background: var(--accent);
  color: #0a0a0a;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  border-radius: 6px;
  padding: 0.45rem;
  margin-top: 0.2rem;
}

/* Download visual (Windows/Linux) */
.download-visual {
  width: 100%;
  background: #1c1c1e;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 0.75rem;
}

.download-visual-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  background: #2c2c2e;
}

.download-visual-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-md);
  flex-shrink: 0;
}

.dv-url {
  font-size: 0.65rem;
  color: var(--muted);
  flex: 1;
  text-align: center;
  background: var(--surface-2);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

.download-visual-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0.5rem;
  color: var(--accent) !important;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
}

.download-visual-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.download-visual-btn:hover { opacity: 0.85; }

/* Terminal visual */
.terminal-visual {
  width: 100%;
  background: #0d1117;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.terminal-bar {
  display: flex;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  background: #161b22;
}

.terminal-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-md);
}

.terminal-body {
  padding: 0.5rem 0.6rem;
  font-family: ui-monospace, "Cascadia Code", "Fira Mono", monospace;
  font-size: 0.68rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: baseline;
}

.term-prompt { color: #58a6ff; flex-shrink: 0; }
.term-cmd    { color: #e6edf3; }
.term-cursor { color: var(--accent); animation: blink 1s step-end infinite; }

@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

/* Responsive install steps */
@media (max-width: 900px) {
  .install-steps-h {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .install-steps-h {
    grid-template-columns: 1fr;
  }
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .how-grid  { grid-template-columns: repeat(2, 1fr); }
  .rooms-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 3rem;
  }

  .hero-mockup { order: -1; }
  .chat-card { max-width: 100%; }

  .why-grid   { grid-template-columns: 1fr; }
  .how-grid   { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .rooms-grid { grid-template-columns: 1fr; }

  .why-comm { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.5rem; }

  .register-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-grid { grid-template-columns: 1fr; }

  .nav { display: none; }
}

@media (max-width: 480px) {
  .modal-dialog { border-radius: 12px; }
  .modal-actions { flex-direction: column; }
  .registration-modal-header { padding: 1.25rem 1.25rem 0.75rem; }
  .modal-body { padding: 1.25rem; }
}

/* ── SCROLL TO TOP ────────────────────────────────────────────────────────── */

.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border-md);
  background: var(--surface-2);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms, background 150ms, color 150ms;
  forced-color-adjust: none;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top-btn:hover {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .scroll-top-btn {
    bottom: 5.5rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* ── ARTICLES LIST ────────────────────────────────────────────────────────── */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms, background 200ms;
}

.article-card:hover {
  border-color: var(--border-md);
  background: var(--surface-2);
  color: inherit;
}

.article-card-date {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
}

.article-card h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.article-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.article-card-arrow {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--accent);
}

/* ── ARTICLE READER ───────────────────────────────────────────────────────── */

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
  text-decoration: none;
  transition: color 150ms;
}

.article-back:hover { color: var(--accent); }

.article-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.article-body {
  max-width: 68ch;
  font-size: 1rem;
  line-height: 1.75;
}

.article-body h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.article-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2.25rem 0 0.6rem;
  color: var(--text);
}

.article-body p {
  margin: 0 0 1.1rem;
  color: var(--muted);
}

.article-body ul, .article-body ol {
  margin: 0 0 1.1rem;
  padding-left: 1.5rem;
  color: var(--muted);
}

.article-body li { margin-bottom: 0.35rem; }

.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.article-body strong { color: var(--text); font-weight: 600; }

.article-body code {
  font-family: ui-monospace, "Cascadia Code", "Fira Mono", monospace;
  font-size: 0.85em;
  background: var(--surface-2);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

.article-loading, .article-error {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 2rem 0;
}

.article-error { color: var(--danger); }

/* ── LEGAL / POLICY ───────────────────────────────────────────────────────── */

.legal-page { max-width: 860px; }

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.section-copy {
  color: var(--muted);
  margin: 0.5rem 0 0;
  font-size: 1rem;
  max-width: 52ch;
  line-height: 1.6;
}

.section-heading {
  margin-bottom: 2.5rem;
}

.section-heading h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.4rem;
}

.policy-text h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2rem 0 0.5rem;
  color: var(--text);
}

.policy-text p {
  color: var(--muted);
  margin: 0 0 0.9rem;
  line-height: 1.7;
  font-size: 0.93rem;
}

.policy-text a { color: var(--accent); }
