:root {
  /* palette */
  --bg: #0b1020;
  --panel: rgba(18, 26, 51, 0.62);
  --panel-2: rgba(18, 26, 51, 0.42);
  --text: #e9ecf5;
  --muted: #a9b2d0;
  --border: rgba(255, 255, 255, 0.1);
  --border-2: rgba(255, 255, 255, 0.14);
  --accent: #7aa2ff;
  --accent2: #7df0c2;
  --danger: #ffb3b3;

  /* layout */
  --radius: 18px;
  --radius-lg: 22px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 12px 35px rgba(0, 0, 0, 0.3);
  --max: 1040px;

  /* type */
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  background: var(--bg);
  overflow-x: hidden;
}

b {
  font-weight: 500;
}

/* background */
.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
      1200px 700px at 14% 12%,
      rgba(122, 162, 255, 0.22),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 86% 16%,
      rgba(125, 240, 194, 0.14),
      transparent 55%
    ),
    radial-gradient(
      900px 700px at 60% 90%,
      rgba(122, 162, 255, 0.12),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 35%),
    var(--bg);
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.12) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(
    900px 520px at 50% 20%,
    black 10%,
    transparent 70%
  );
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(122, 162, 255, 0.55);
  outline-offset: 3px;
  border-radius: 12px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 18px 72px;
}

/* topbar + nav */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 22px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 140px;
}

.logo {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: url("img/logo_96.png") center center / cover no-repeat;
  box-shadow: var(--shadow-soft);
}

.brand .name {
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 15px;
}

.brand .tag {
  display: block;
  color: rgba(233, 236, 245, 0.65);
  font-size: 12px;
  margin-top: -2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(233, 236, 245, 0.78);
  font-size: 14px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nav a:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.nav a.active {
  border-color: rgba(122, 162, 255, 0.6);
  background: rgba(122, 162, 255, 0.16);
  color: var(--text);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0;
  cursor: pointer;
}

.nav-toggle-icon {
  position: relative;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    right: 0;
    top: calc(100% - 10px);
    padding: 8px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-2);
    background: rgba(18, 26, 51, 0.95);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    min-width: 180px;
    display: none;
    z-index: 10;
  }

  .nav.nav-open {
    display: flex;
  }

  .nav a {
    width: 100%;
    text-align: left;
  }
}

/* hero (index) */
.hero {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    180deg,
    rgba(18, 26, 51, 0.78),
    rgba(18, 26, 51, 0.46)
  );
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(
      700px 260px at 22% 0%,
      rgba(122, 162, 255, 0.18),
      transparent 60%
    ),
    radial-gradient(
      700px 260px at 78% 0%,
      rgba(125, 240, 194, 0.1),
      transparent 60%
    );
  pointer-events: none;
  opacity: 0.85;
}

.hero-inner {
  position: relative;
  padding: 28px 22px 18px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.8px;
  font-weight: normal;
}

.sub {
  margin: 0 0 18px;
  font-size: 16px;
  color: rgba(233, 236, 245, 0.72);
  max-width: 78ch;
}

.lead {
  margin: 0 0 12px;
  color: rgba(233, 236, 245, 0.9);
  max-width: 82ch;
  font-size: 15px;
}

.lead b {
  color: var(--text);
}

.cta {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn.primary {
  border-color: rgba(122, 162, 255, 0.45);
  background: linear-gradient(
    135deg,
    rgba(122, 162, 255, 0.2),
    rgba(125, 240, 194, 0.1)
  );
}

.btn.primary:hover {
  border-color: rgba(122, 162, 255, 0.62);
}

.btn .dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent2);
  box-shadow: 0 0 0 4px rgba(125, 240, 194, 0.12);
}

/* feature grid (index) */
.features {
  padding: 0 22px 22px;
  position: relative;
}

.features-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.features-head h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: rgba(233, 236, 245, 0.82);
}

.features-head .hint {
  margin: 0;
  font-size: 12px;
  color: rgba(233, 236, 245, 0.55);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(18, 26, 51, 0.52);
  padding: 14px 14px 12px;
  min-height: 122px;
  transition: transform 0.14s ease, border-color 0.14s ease,
    background 0.14s ease;
}

.card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(18, 26, 51, 0.58);
}

.k {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.15px;
}

.pill {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(122, 162, 255, 0.1);
  flex: 0 0 auto;
}

.pill.g {
  background: var(--accent2);
  box-shadow: 0 0 0 4px rgba(125, 240, 194, 0.1);
}

.pill.r {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 179, 179, 0.1);
}

.card p {
  margin: 0;
  color: rgba(233, 236, 245, 0.7);
  font-size: 14px;
}

/* generic sections */
.section {
  margin-top: 14px;
  padding: 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(18, 26, 51, 0.38);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.section.important {
  border-color: rgba(255, 179, 179, 0.22);
  background: rgba(255, 179, 179, 0.06);
}

.section h3 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0.2px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.section p {
  margin: 0 0 10px;
  color: rgba(233, 236, 245, 0.68);
  max-width: 92ch;
}

.section p:last-child {
  margin-bottom: 0;
}

/* support-specific */
.section h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.4px;
}

.support-list {
  margin: 4px 0 8px 18px;
  padding: 0;
  color: rgba(233, 236, 245, 0.85);
  font-size: 15px;
}

.support-list li {
  margin-bottom: 4px;
}

.support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.12s ease;
}

.support-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

/* docs (terms & privacy) */
.doc-header h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.3vw, 30px);
  letter-spacing: -0.4px;
}

.doc-header p {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--muted);
}

.doc section {
  margin: 14px 0 18px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.doc section h2 {
  margin: 0 0 6px;
  font-size: 15px;
  letter-spacing: 0.16px;
  text-transform: uppercase;
  color: rgba(233, 236, 245, 0.9);
}

.doc p {
  margin: 0 0 8px;
  font-size: 14px;
  color: rgba(233, 236, 245, 0.84);
}

.doc .clause strong {
  color: var(--text);
}

.doc ul {
  margin: 4px 0 10px 20px;
  padding: 0;
}

.doc li {
  margin-bottom: 4px;
  font-size: 14px;
  color: rgba(233, 236, 245, 0.84);
}

.doc .footer-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

/* footer */
footer {
  margin-top: 18px;
  padding: 14px 4px 0;
  color: rgba(233, 236, 245, 0.62);
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

footer a {
  color: rgba(233, 236, 245, 0.72);
  border-bottom: 1px solid transparent;
}

footer a:hover {
  color: var(--text);
  border-bottom-color: rgba(233, 236, 245, 0.32);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .bg::after {
    display: none;
  }
}
