:root {
  --bg: #0b1020;
  --surface: #121832;
  --surface-2: #171f3a;
  --border: #222a4a;
  --text: #d8dcf0;
  --muted: #8a91b4;
  --accent: #8b9cff;
  --accent-ink: #0b1020;
  --ok: #7ee2c5;
  --danger: #e58a9a;
  --glow: rgba(139, 156, 255, 0.25);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
}

body {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 24, 50, 0.8);
  background: color-mix(in oklab, var(--surface) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 8px 10px;
  cursor: pointer;
  min-height: 40px;
  min-width: 40px;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.nav-toggle:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.nav-toggle::before {
  content: "☰";
  font-size: 1.4rem;
  line-height: 1;
}

.nav-menu {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--muted);
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.is-active {
  color: var(--accent);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 80px 16px;
  text-align: center;
  background: radial-gradient(60% 80% at 50% 0%, var(--glow), transparent);
}

.hero-content {
  max-width: 600px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 600;
  margin: 0 0 16px;
  line-height: 1.2;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
  transition: transform 0.08s, opacity 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 16px var(--glow), 0 0 0 1px rgba(139, 156, 255, 0.3);
}

.btn-primary:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.btn-disabled {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: default;
}

/* Sections */
.section {
  padding: 60px 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-alt {
  background: var(--surface);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 0 32px;
  text-align: center;
}

/* Page hero */
.page-hero {
  padding: 60px 16px 40px;
  text-align: center;
  background: radial-gradient(60% 80% at 50% 0%, var(--glow), transparent);
}

.page-hero h1 {
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  font-weight: 600;
  margin: 0 0 12px;
}

.page-sub {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
}

.step-icon {
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.step-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.features-grid-full {
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .features-grid-full {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .features-grid-full {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--border);
}

.feature-card .icon {
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Carousel */
.carousel {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  padding: 0 48px;
}

.carousel-track {
  display: flex;
  overflow: hidden;
  border-radius: 16px;
}

.carousel-slide {
  min-width: 100%;
  transition: transform 0.3s ease;
}

.phone-frame {
  background: #000;
  border-radius: 32px;
  padding: 12px;
  border: 2px solid var(--border);
}

.phone-frame img {
  width: 100%;
  border-radius: 24px;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--surface-2);
}

.carousel-prev {
  left: 0;
}

.carousel-next {
  right: 0;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 0;
  cursor: pointer;
  padding: 0;
}

.carousel-dot::before {
  content: "";
  position: absolute;
  inset: -8px;
}

.carousel-dot.is-active {
  background: var(--accent);
}

/* Privacy block */
.privacy-block {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.privacy-block p {
  color: var(--muted);
  margin-bottom: 24px;
}

/* FAQ */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.faq-item summary {
  padding: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "▾";
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-item p {
  padding: 0 16px 16px;
  margin: 0;
  color: var(--muted);
}

/* Contact block */
.contact-block {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-block p {
  color: var(--muted);
}

/* Press */
.press-block {
  max-width: 700px;
  margin: 0 auto;
}

.boilerplate {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.boilerplate p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.downloads-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .downloads-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.download-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text);
  text-align: center;
}

.download-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.download-card span:first-child {
  font-weight: 600;
}

.download-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Doc page */
.doc-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 16px;
}

.doc-page h1 {
  font-size: 2rem;
  margin: 0 0 8px;
}

.doc-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.doc-page h2 {
  font-size: 1.4rem;
  margin: 32px 0 16px;
}

.doc-page h3 {
  font-size: 1.1rem;
  margin: 24px 0 12px;
}

.doc-page p,
.doc-page li {
  color: var(--muted);
  line-height: 1.7;
}

.doc-page ul {
  padding-left: 24px;
}

.doc-summary {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
}

.doc-summary h2 {
  margin-top: 0;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 16px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.footer-copy {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    gap: 0;
    padding: 0;
    transition: max-height 0.25s ease, padding 0.25s ease;
  }

  .nav-menu.is-open {
    display: flex;
    max-height: 400px;
    padding: 8px 0;
  }

  .nav-menu li {
    padding: 4px 16px;
  }

  .nav-menu a {
    display: block;
    padding: 14px 12px;
    min-height: 48px;
    line-height: 1.4;
    border-radius: 8px;
  }

  .nav-menu a:hover,
  .nav-menu a.is-active {
    background: var(--surface-2);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* --- 2026-10-06 polish --- */
.sprite-defs { position: absolute; }
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 200;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }
.phone-frame picture { display: block; }
