/* ==================== TOKENS ==================== */
:root {
  --bg:           #0B1120;
  --bg2:          #111A2E;
  --bg3:          #182034;
  --bg4:          #1E2840;
  --text:         #E4EDFF;
  --muted:        #6B82A8;
  --accent:       #2B7FFF;
  --accent2:      #5BA4FF;
  --accent-hover: #1A6AEF;
  --border:       #1E2E4A;
  --glass:        rgba(11, 17, 32, 0.88);
  --shadow:       0 4px 30px rgba(0, 0, 0, 0.5);
  --shadow-md:    0 8px 40px rgba(0, 0, 0, 0.6);
  --radius:       14px;
  --radius-sm:    8px;
  --transition:   0.2s ease;
  --badge-bg:     rgba(43, 127, 255, 0.12);
  --badge-border: rgba(43, 127, 255, 0.28);
  --step-bg:      rgba(43, 127, 255, 0.1);
  --step-border:  rgba(43, 127, 255, 0.22);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:           #ECF0FB;
    --bg2:          #FFFFFF;
    --bg3:          #E2E8F6;
    --bg4:          #D6DDEF;
    --text:         #0C1835;
    --muted:        #536890;
    --border:       #C2CEEA;
    --glass:        rgba(236, 240, 251, 0.9);
    --shadow:       0 4px 30px rgba(0, 0, 0, 0.08);
    --shadow-md:    0 8px 40px rgba(0, 0, 0, 0.12);
    --badge-bg:     rgba(43, 127, 255, 0.09);
    --badge-border: rgba(43, 127, 255, 0.22);
    --step-bg:      rgba(43, 127, 255, 0.07);
    --step-border:  rgba(43, 127, 255, 0.18);
  }
}

:root[data-theme="dark"] {
  --bg:           #0B1120;
  --bg2:          #111A2E;
  --bg3:          #182034;
  --bg4:          #1E2840;
  --text:         #E4EDFF;
  --muted:        #6B82A8;
  --border:       #1E2E4A;
  --glass:        rgba(11, 17, 32, 0.88);
  --shadow:       0 4px 30px rgba(0, 0, 0, 0.5);
  --shadow-md:    0 8px 40px rgba(0, 0, 0, 0.6);
  --badge-bg:     rgba(43, 127, 255, 0.12);
  --badge-border: rgba(43, 127, 255, 0.28);
  --step-bg:      rgba(43, 127, 255, 0.1);
  --step-border:  rgba(43, 127, 255, 0.22);
}

:root[data-theme="light"] {
  --bg:           #ECF0FB;
  --bg2:          #FFFFFF;
  --bg3:          #E2E8F6;
  --bg4:          #D6DDEF;
  --text:         #0C1835;
  --muted:        #536890;
  --border:       #C2CEEA;
  --glass:        rgba(236, 240, 251, 0.9);
  --shadow:       0 4px 30px rgba(0, 0, 0, 0.08);
  --shadow-md:    0 8px 40px rgba(0, 0, 0, 0.12);
  --badge-bg:     rgba(43, 127, 255, 0.09);
  --badge-border: rgba(43, 127, 255, 0.22);
  --step-bg:      rgba(43, 127, 255, 0.07);
  --step-border:  rgba(43, 127, 255, 0.18);
}

/* ==================== RESET ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ==================== LAYOUT ==================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
  margin-bottom: 1rem;
  color: var(--text);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.75;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ==================== BADGE ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--badge-bg);
  color: var(--accent2);
  border: 1px solid var(--badge-border);
}
a.badge { transition: opacity var(--transition); }
a.badge:hover { opacity: 0.8; }

.badge-build-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background var(--transition);
}
.badge-build-dot.passing { background: #3fb950; }
.badge-build-dot.failing { background: #f85149; }

/* ==================== NAVBAR ==================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border);
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.navbar-logo img { border-radius: 8px; }
.navbar-nav {
  display: flex;
  gap: 1.75rem;
  margin-left: 1rem;
}
.navbar-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
}
.navbar-nav a:hover { color: var(--text); }
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}
.navbar-actions .btn { height: 2.375rem; }
.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius-sm);
  height: 2.375rem;
  width: 2.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-btn:hover { color: var(--text); border-color: var(--accent); }

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 7rem 0 5rem;
}
.hero-glow {
  position: absolute;
  top: -280px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(ellipse at center, rgba(43, 127, 255, 0.14) 0%, transparent 65%);
  pointer-events: none;
}
.hero-shield-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  color: var(--accent);
  opacity: 0.03;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.hero-icon {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(43,127,255,0.25), 0 20px 60px rgba(43,127,255,0.22);
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.hero-title {
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.028em;
  text-wrap: balance;
  color: var(--text);
}
.hero-title em {
  font-style: normal;
  color: var(--accent2);
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--muted);
  max-width: 520px;
  line-height: 1.75;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.5rem;
}
.hero-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}
.stack-pill {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
}

/* ==================== FEATURES ==================== */
.features-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(43,127,255,0.1), var(--shadow);
}
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 0.85rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.feature-icon svg {
  width: 22px;
  height: 22px;
}
.feature-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.feature-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ==================== SCREENSHOTS ==================== */
.screenshots-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.screenshot-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.window-tab {
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--muted);
  transition: all var(--transition);
  white-space: nowrap;
}
.window-tab:hover { color: var(--text); border-color: var(--accent); }
.window-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.screenshot-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 380px;
  margin: 0 auto;
}
.screenshot-img {
  max-height: 540px;
  width: auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  display: none;
}
.screenshot-img.active { display: block; }

/* ==================== DOWNLOAD ==================== */
.download-header {
  text-align: center;
  margin-bottom: 3rem;
}
.download-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.appstore-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}
.download-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(43,127,255,0.2);
}
.download-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.download-card-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.65;
}
.download-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.83rem;
  color: var(--muted);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  line-height: 1.6;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.download-note svg { flex-shrink: 0; margin-top: 2px; color: var(--accent2); }
.download-note strong { color: var(--text); }

/* ==================== FOOTER ==================== */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  gap: 4rem;
  padding-top: 3rem;
  padding-bottom: 2rem;
}
.footer-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.footer-logo img { border-radius: 6px; }
.footer-desc {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.7;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .navbar-nav { display: none; }
  .navbar-logo span { display: none; }
  .github-text { display: none; }
  .navbar-actions .btn { padding-left: 0.85rem; padding-right: 0.85rem; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}
@media (max-width: 520px) {
  .screenshot-frame { padding: 1.25rem 1rem; min-height: 300px; }
  .screenshot-img { max-height: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}