:root {
  --base-900: #060913;
  --base-800: #0a1020;
  --base-700: #0f1830;
  --base-600: #162142;
  --glass: rgba(16, 28, 52, 0.55);
  --glass-light: rgba(28, 44, 78, 0.45);
  --glass-edge: rgba(120, 180, 255, 0.12);
  --cyan-glow: #22d3ee;
  --cyan-soft: #67e8f9;
  --cyan-deep: #0e7490;
  --mint-glow: #34eeb6;
  --mint-soft: #6ee7b7;
  --danger-glow: #ff3d71;
  --ink-primary: #e8f4ff;
  --ink-muted: #7a8fb0;
  --ink-dim: #4a5a78;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--base-900);
  color: var(--ink-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* Aurora background, matches the app */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(34, 211, 238, 0.25), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 90%, rgba(52, 238, 182, 0.2), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(99, 102, 241, 0.12), transparent 70%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 180, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

main {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.72;
  text-decoration: none;
  border-bottom: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-primary);
  text-decoration: none;
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  padding: 10px 18px;
  border-radius: 10px;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.nav-link:hover {
  color: var(--cyan-glow);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(28, 44, 78, 0.7);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.18);
}

.nav-link[aria-current='page'] {
  color: var(--cyan-soft);
  border-color: rgba(34, 211, 238, 0.35);
}

.logo {
  width: 36px;
  height: 36px;
  display: block;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.3));
}

.brand {
  font-family: 'Rajdhani', sans-serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-primary);
  text-shadow: 0 0 6px rgba(34, 211, 238, 0.3);
  transform: translateY(2px);
}

h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

h1 .accent {
  background: linear-gradient(135deg, var(--cyan-glow), var(--mint-glow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 20px;
  color: var(--ink-muted);
  max-width: 620px;
  margin: 0 0 40px;
}

/* Glass card */
.card {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-edge);
  border-radius: 20px;
  padding: 36px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.download-card {
  margin-bottom: 24px;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.download-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--base-900);
  background: linear-gradient(135deg, var(--cyan-glow), var(--mint-glow));
  border: none;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    0 0 24px rgba(34, 211, 238, 0.35),
    0 0 48px rgba(34, 211, 238, 0.15);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease;
}

.download-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 32px rgba(34, 211, 238, 0.5),
    0 0 64px rgba(34, 211, 238, 0.2);
}

.download-button[aria-disabled='true'] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

.download-meta {
  font-size: 14px;
  color: var(--ink-muted);
}

.download-meta strong {
  color: var(--ink-primary);
  font-weight: 500;
}

/* SmartScreen explainer (important, since RiftSync is unsigned for now) */
.smartscreen {
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: 14px;
  background: rgba(255, 200, 80, 0.06);
  border: 1px solid rgba(255, 200, 80, 0.25);
}

.smartscreen-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #ffd479;
  margin: 0 0 10px;
}

.smartscreen-title::before {
  content: '!';
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 200, 80, 0.2);
  color: #ffd479;
  font-weight: 700;
  font-size: 14px;
}

.smartscreen p {
  margin: 0 0 10px;
  color: var(--ink-primary);
  font-size: 15px;
}

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

.smartscreen ol {
  margin: 8px 0 12px 20px;
  padding: 0;
  color: var(--ink-primary);
  font-size: 15px;
}

.smartscreen ol li {
  margin: 4px 0;
}

.smartscreen kbd {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  background: rgba(120, 180, 255, 0.12);
  border: 1px solid var(--glass-edge);
  font-family: inherit;
  font-size: 13px;
  color: var(--cyan-soft);
}

a {
  color: var(--cyan-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(103, 232, 249, 0.3);
  transition:
    color 150ms ease,
    border-color 150ms ease;
}

a:hover {
  color: var(--cyan-glow);
  border-bottom-color: var(--cyan-glow);
}

/* FAQ */
.faq-card + .faq-card {
  margin-top: 14px;
}

.faq {
  display: grid;
  gap: 12px;
}

details.faq-item {
  background: var(--glass-light);
  border: 1px solid var(--glass-edge);
  border-radius: 14px;
  padding: 0 22px;
  transition: background 150ms ease;
}

details.faq-item[open] {
  background: rgba(28, 44, 78, 0.6);
}

details.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

details.faq-item > summary::after {
  content: '+';
  font-family: 'Rajdhani', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--cyan-soft);
  width: 24px;
  text-align: center;
  transition: transform 200ms ease;
  flex-shrink: 0;
}

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

details.faq-item > .faq-answer {
  padding: 0 0 20px;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.65;
}

details.faq-item > .faq-answer p {
  margin: 0 0 10px;
}

details.faq-item > .faq-answer p:last-child {
  margin-bottom: 0;
}

details.faq-item > .faq-answer code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(120, 180, 255, 0.1);
  border: 1px solid var(--glass-edge);
  color: var(--cyan-soft);
}

/* What it does section */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--cyan-soft);
  margin: 0 0 6px;
}

.feature p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin: 0 0 16px;
}

footer {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px 60px;
  font-size: 13px;
  color: var(--ink-dim);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

footer a {
  color: var(--ink-muted);
  border-bottom-color: transparent;
}

footer a:hover {
  color: var(--cyan-soft);
}

/* Mobile-only download notice — hidden by default, shown via JS */
.mobile-notice {
  display: none;
}

body.is-mobile .download-button {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

body.is-mobile .download-button:hover {
  transform: none;
  box-shadow: none;
}

body.is-mobile .mobile-notice {
  display: block;
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(120, 180, 255, 0.08);
  border: 1px solid var(--glass-edge);
  font-size: 14px;
  color: var(--ink-muted);
  text-align: center;
}

body.is-mobile .smartscreen {
  display: none;
}

@media (max-width: 600px) {
  main {
    padding: 48px 20px 80px;
  }
  .card {
    padding: 28px 22px;
  }
  .download-button {
    width: 100%;
    justify-content: center;
  }
}
