:root {
  --bg: #0b1220;
  --bg-soft: #101a2c;
  --panel: #121f33;
  --panel-2: #17263c;
  --line: rgba(180, 205, 235, 0.14);
  --text: #edf4ff;
  --muted: #9fb0c7;
  --blue: #6aa9ff;
  --mint: #79e6c4;
  --violet: #b9a2ff;
  --pink: #ff9ec4;
  --amber: #ffd27a;
  --radius: 22px;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 86% -10%, rgba(106, 169, 255, 0.18), transparent 60%),
    radial-gradient(700px 500px at -10% 22%, rgba(121, 230, 196, 0.10), transparent 55%),
    var(--bg);
  font: 16px/1.65 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: #9cc4ff; }

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--panel);
  padding: 10px 14px;
  border-radius: 10px;
}
.skip:focus { left: 12px; z-index: 100; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(11, 18, 32, 0.76);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 18px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  flex: 0 0 auto;
}
.brand-text { font-weight: 700; letter-spacing: -0.02em; }
.brand-text small { display: block; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 600; }
.nav a:hover { color: var(--text); }
.nav-gitlab {
  color: var(--text) !important;
  border: 1px solid var(--line);
  padding: 9px 13px;
  border-radius: 11px;
}
.nav-gitlab:hover { border-color: rgba(140, 190, 255, 0.55); }

.nav-toggle {
  display: none;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
}

.hero { position: relative; padding: 80px 0 48px; overflow: hidden; }
.hero-glow {
  position: absolute;
  inset: -200px -10% auto auto;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106, 169, 255, 0.22), transparent 65%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  position: relative;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px var(--mint); }
h1 {
  margin: 0;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.045em;
}
h1 span { color: var(--blue); }
.lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); max-width: 610px; margin: 22px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: linear-gradient(145deg, var(--blue), #8f7dff); color: #07111f; }
.btn.ghost { background: rgba(255, 255, 255, 0.03); border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: rgba(140, 190, 255, 0.5); }
.btn-download {
  border-color: rgba(140, 190, 255, 0.42);
  box-shadow: 0 14px 34px rgba(106, 169, 255, 0.28);
}
.btn-download:hover {
  box-shadow: 0 18px 42px rgba(106, 169, 255, 0.38);
}
.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 9px;
  border-radius: 50%;
  background: rgba(7, 17, 31, 0.16);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.hero-facts { display: flex; gap: 32px; list-style: none; padding: 0; margin: 38px 0 0; }
.hero-facts li { display: grid; gap: 2px; }
.hero-facts strong { font-size: 24px; letter-spacing: -0.03em; }
.hero-facts span { color: var(--muted); font-size: 12px; }

.hero-visual { position: relative; min-height: 560px; }
.phone {
  position: absolute;
  width: min(285px, 66%);
  border-radius: 34px;
  border: 8px solid #1c2b42;
  background: #0d1728;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone-front { right: 5%; top: 8%; z-index: 2; transform: rotate(3deg); }
.phone-back { left: 2%; top: 24%; z-index: 1; transform: rotate(-5deg) scale(0.9); opacity: 0.72; }
.phone-notch {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 18px;
  border-radius: 12px;
  background: #0b1220;
  z-index: 3;
}

.section { padding: 88px 0; }
.section-alt { background: linear-gradient(180deg, rgba(255,255,255,0.018), transparent); border-block: 1px solid var(--line); }
.section-head { max-width: 660px; margin-bottom: 38px; }
h2 { margin: 0; font-size: clamp(30px, 3.5vw, 44px); line-height: 1.08; letter-spacing: -0.035em; }
.section-sub { color: var(--muted); margin: 14px 0 0; font-size: 17px; }
.muted { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 25px;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent, var(--blue));
  opacity: 0.9;
}
.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.055);
  color: var(--accent, var(--blue));
  font-size: 20px;
  margin-bottom: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.accent-blue { --accent: var(--blue); }
.accent-violet { --accent: var(--violet); }
.accent-mint { --accent: var(--mint); }
.accent-amber { --accent: var(--amber); }
.accent-pink { --accent: var(--pink); }
.accent-teal { --accent: #64d8d0; }

.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.shot { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 10px; }
.shot img { border-radius: 14px; width: 100%; }
.shot figcaption { text-align: center; color: var(--muted); font-size: 12px; padding-top: 9px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }

.split { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 11px; }
.checks li { padding-left: 28px; position: relative; color: var(--muted); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: -1px; color: var(--mint); font-weight: 800; }
.privacy-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 22px; }
.privacy-row { display: flex; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.privacy-row:last-child { border-bottom: 0; }
.privacy-row span { color: var(--muted); font-size: 14px; }
.privacy-row b { font-size: 13px; color: var(--mint); text-align: right; }

.section-cta { padding-top: 40px; }
.cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(106,169,255,0.16), transparent 60%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 38px;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 280px;
}
.cta-actions .btn { width: 100%; }
.cta-actions .btn-download { min-height: 52px; padding-inline: 26px; }

.permissions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.permission {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.permission b {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.permission span {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* Documentation */
.doc-hero { padding: 56px 0 28px; }
.doc-layout { display: grid; grid-template-columns: 245px 1fr; gap: 46px; align-items: start; padding-bottom: 80px; }
.doc-nav {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  padding: 18px;
}
.doc-nav strong { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.doc-nav a { display: block; color: var(--muted); font-size: 13.5px; padding: 7px 0; }
.doc-nav a:hover { color: var(--text); }
.doc-content { min-width: 0; }
.doc-content section { scroll-margin-top: 96px; padding-bottom: 34px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.doc-content section:last-child { border-bottom: 0; }
.doc-content h2 { font-size: clamp(25px, 3vw, 34px); }
.doc-content h3 { margin: 26px 0 8px; font-size: 18px; letter-spacing: -0.01em; }
.doc-content p, .doc-content li { color: var(--muted); }
.doc-content code {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
  color: #cfe2ff;
}
.doc-content pre {
  background: #08101d;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  overflow: auto;
}
.doc-content pre code { background: transparent; border: 0; padding: 0; }
.doc-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.doc-content th, .doc-content td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-content th { color: var(--text); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.doc-content td { color: var(--muted); }

.note {
  border-left: 3px solid var(--mint);
  background: rgba(121, 230, 196, 0.06);
  padding: 12px 16px;
  border-radius: 0 12px 12px 0;
  color: var(--muted);
  font-size: 14px;
}
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.badge { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; }

@media (max-width: 1020px) {
  .hero-grid, .split, .cta { grid-template-columns: 1fr; }
  .hero-visual { min-height: 470px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-nav { position: static; }
  .cta { padding: 28px; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 62px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 16px 18px;
    background: rgba(11, 18, 32, 0.98);
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 4px; }
  .nav-gitlab { text-align: center; margin-top: 4px; }
  .hero { padding-top: 52px; }
  .hero-visual { min-height: 420px; }
  .phone { width: 70%; }
  .phone-front { right: 0; }
  .phone-back { left: 0; opacity: 0.55; }
  .hero-facts { gap: 20px; }
  .cards, .shots { grid-template-columns: 1fr; }
  .section { padding: 62px 0; }
  .privacy-panel { padding: 6px 16px; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}
