:root {
  color-scheme: dark;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.65;

  --bg: #0a1440;
  --bg-alt: #081030;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.10);
  --text: #eaf0ff;
  --muted: #9aa8d6;

  --accent: #34d8a3;
  --accent-dim: #1f8f6e;
  --accent-soft: rgba(52, 216, 163, 0.14);
  --royal: #2a4bd8;
  --royal-soft: rgba(59, 111, 224, 0.16);
  --highlight: #fde68a;
  --highlight-text: #241d05;

  --radius: 18px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(52, 216, 163, 0.12), transparent 60%),
    radial-gradient(900px 550px at -10% 8%, rgba(59, 111, 224, 0.18), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-alt));
  color: var(--text);
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--highlight); color: var(--highlight-text); }

/* ---------- Layout helpers ---------- */
.hero, .section, .footer-top, .footer-bottom, .header-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- Highlight marks ---------- */
mark.highlight {
  background: linear-gradient(180deg, transparent 55%, var(--highlight) 55%);
  color: var(--text);
  padding: 0 2px;
  font-weight: 600;
  border-radius: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 16, 48, 0.75);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  position: relative;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--border), 0 4px 12px -4px rgba(0,0,0,0.5);
}

.brand-accent { color: var(--accent); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
}

.main-nav a:not(.button) {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.main-nav a:not(.button)::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.main-nav a:not(.button):hover { color: var(--text); }
.main-nav a:not(.button):hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 16px;
  height: 1.5px;
  background: var(--text);
  margin: 0 auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.button.small { padding: 9px 16px; font-size: 0.85rem; }
.button.large { padding: 15px 30px; font-size: 1rem; }

.button.primary {
  background: var(--accent);
  color: #052018;
  box-shadow: 0 8px 24px -8px rgba(52, 216, 163, 0.55);
}
.button.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(52, 216, 163, 0.65); }

.button.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.button.secondary:hover { background: var(--surface-strong); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  padding: 76px 0 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--accent);
  margin: 0 0 14px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.hero-lede { color: var(--muted); max-width: 560px; font-size: 1.02rem; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.hero-tags {
  list-style: none;
  display: flex;
  gap: 18px;
  padding: 0;
  margin: 26px 0 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
}
.hero-tags li { display: flex; align-items: center; gap: 6px; }
.hero-tags li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Hero mock browser (signature element) ---------- */
.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.mock-browser {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--bg-alt), #0a1240);
  box-shadow: 0 30px 60px -25px rgba(0,0,0,0.6), 0 0 0 1px rgba(59,111,224,0.08);
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.dot { width: 8px; height: 8px; border-radius: 50%; opacity: 0.8; }
.dot.red { background: #f87171; }
.dot.yellow { background: #fbbf24; }
.dot.green { background: #4ade80; }
.mock-url {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  padding: 3px 10px;
  border-radius: 999px;
}

.mock-body { position: relative; padding: 20px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }

.mock-line { height: 9px; border-radius: 5px; background: rgba(255,255,255,0.08); width: 100%; }
.mock-line.title { height: 14px; width: 60%; background: rgba(255,255,255,0.16); }
.mock-line.short { width: 40%; }

.mock-ad {
  height: 30px;
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, rgba(248,113,113,0.18), rgba(248,113,113,0.18) 6px, rgba(248,113,113,0.28) 6px, rgba(248,113,113,0.28) 12px);
  border: 1px dashed rgba(248,113,113,0.55);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #fca5a5;
  animation: adFade 3.6s ease-in-out infinite;
}
.mock-ad.ad-2 { animation-delay: 0.4s; }
.mock-ad.ad-3 { animation-delay: 0.8s; }

@keyframes adFade {
  0%, 30% { opacity: 1; transform: scaleY(1); }
  45%, 100% { opacity: 0; transform: scaleY(0); height: 0; margin: 0; padding: 0; border: none; }
}

.sweep {
  position: absolute;
  top: 0; left: -20%;
  width: 20%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(253, 230, 138, 0.35), transparent);
  animation: sweepMove 3.6s ease-in-out infinite;
}
@keyframes sweepMove {
  0% { left: -20%; }
  50% { left: 110%; }
  100% { left: 110%; }
}

.mock-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Sections ---------- */
.section { padding: 46px 0; }

.section-head { margin-bottom: 26px; max-width: 640px; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 0;
  letter-spacing: -0.01em;
}

.content-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
}
.content-block p { margin: 0 0 16px; color: var(--muted); }
.content-block p:last-child { margin-bottom: 0; }

.changelog-entry { display: flex; align-items: center; gap: 16px; }
.version-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}
.changelog-entry p { margin: 0; }

/* ---------- Grid / Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 216, 163, 0.35);
  background: var(--surface-strong);
}
.card-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ---------- Download section ---------- */
.download-section { display: flex; justify-content: center; }
.download-card {
  width: 100%;
  max-width: 640px;
  text-align: center;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 44px 36px;
}
.download-card .eyebrow { justify-content: center; display: flex; }
.download-card ol {
  list-style: none;
  counter-reset: step;
  padding: 0;
  text-align: left;
  margin: 26px 0;
  display: grid;
  gap: 12px;
}
.download-card ol li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  color: var(--muted);
  font-size: 0.95rem;
}
.download-card ol li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center;
}
.download-card strong, .download-card code { color: var(--text); }
.download-card code {
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.compat-note { color: var(--muted); font-size: 0.88rem; margin-bottom: 24px; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; }

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 22px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
details[open] { background: var(--surface-strong); border-color: rgba(52, 216, 163, 0.3); }

details summary {
  cursor: pointer;
  font-weight: 600;
  outline: none;
  list-style: none;
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
details summary::-webkit-details-marker { display: none; }

.chev {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.1rem;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
details[open] .chev { transform: rotate(45deg); }

details p { margin: 0 0 18px; color: var(--muted); font-size: 0.94rem; }

/* ---------- CTA band ---------- */
.cta-band {
  width: min(1120px, calc(100% - 40px));
  margin: 20px auto 70px;
  text-align: center;
  padding: 54px 30px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(52,216,163,0.16), rgba(52,216,163,0.04));
  border: 1px solid rgba(52, 216, 163, 0.25);
}
.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 0 0 22px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
  padding-top: 50px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 320px; margin: 12px 0 0; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-links h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 14px;
}
.footer-links a {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 5px 0;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 46px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: rgba(8, 16, 48, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease, visibility 0s linear 0.3s;
  }
  .main-nav.open {
    max-height: calc(100vh - 80px);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding: 14px 20px 20px;
    overflow-y: auto;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease, visibility 0s linear 0s;
  }
  .main-nav a:not(.button) { width: 100%; padding: 10px 0; }
  .main-nav .button { margin-top: 8px; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .download-card { padding: 34px 22px; }
}

/* ---------- Legal pages (privacy / support) ---------- */
.legal-hero {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 20px;
  text-align: center;
}
.legal-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.legal-hero .hero-lede { margin: 0 auto; }

.legal-body {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
}
.legal-body .content-block h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0 0 12px;
}
.legal-body .content-block p:last-child { margin-bottom: 0; }

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
}
.check-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.94rem;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

.legal-body code {
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
}

/* focus visibility */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}