*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #07080f;
  --bg-2: #0a0a0b;
  --surface: rgba(12, 13, 24, 0.72);
  --text: #f5f5f2;
  --text-muted: #8a8b83;
  --accent: #6d84ff;
  --accent-deep: #4d6bfe;
  --accent-glow: rgba(109, 132, 255, 0.4);
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --border: rgba(129, 140, 248, 0.22);
  --radius: 14px;
  --font: "Space Grotesk", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

/* ── Background ─────────────────────────────────────────── */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.13;
  animation: aurora-drift 44s ease-in-out infinite alternate;
  will-change: transform;
}

.aurora-orb--1 {
  width: min(72vw, 1100px);
  height: min(72vw, 1100px);
  background: var(--accent-deep);
  top: -20%;
  left: -18%;
  animation-duration: 46s;
}

.aurora-orb--2 {
  width: min(58vw, 920px);
  height: min(58vw, 920px);
  background: var(--violet);
  top: 18%;
  right: -20%;
  opacity: 0.1;
  animation-duration: 54s;
  animation-delay: -16s;
}

.aurora-orb--3 {
  width: min(52vw, 840px);
  height: min(52vw, 840px);
  background: var(--cyan);
  bottom: -18%;
  left: 22%;
  opacity: 0.08;
  animation-duration: 50s;
  animation-delay: -28s;
}

.aurora-orb--4 {
  width: min(40vw, 640px);
  height: min(40vw, 640px);
  background: var(--accent);
  top: 42%;
  left: 38%;
  opacity: 0.07;
  animation-duration: 38s;
  animation-delay: -10s;
}

@keyframes aurora-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(42px, -28px, 0) scale(1.07); }
  66% { transform: translate3d(-24px, 36px, 0) scale(0.95); }
  100% { transform: translate3d(28px, 18px, 0) scale(1.05); }
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  --cell: clamp(48px, 3.8vw, 80px);
  background-image:
    linear-gradient(rgba(109, 132, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 132, 255, 0.1) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(109, 132, 255, 0.14) 1px, transparent 1px);
  background-size: var(--cell) var(--cell), var(--cell) var(--cell), var(--cell) var(--cell);
  mask-image: radial-gradient(ellipse 110% 95% at 50% 34%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 110% 95% at 50% 34%, #000 30%, transparent 100%);
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, transparent 40%, rgba(7, 8, 15, 0.55) 100%),
    linear-gradient(180deg, rgba(7, 8, 15, 0.35) 0%, transparent 25%, transparent 75%, rgba(7, 8, 15, 0.5) 100%);
}

.hero-orb {
  position: absolute;
  width: min(75vw, 920px);
  height: min(75vw, 920px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 132, 255, 0.1) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
  filter: blur(2px);
  animation: hero-breathe 7s ease-in-out infinite;
}

@keyframes hero-breathe {
  0%, 100% {
    opacity: 0.45;
    transform: translate(-50%, -54%) scale(1);
  }
  50% {
    opacity: 0.85;
    transform: translate(-50%, -54%) scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-orb {
    animation: none;
    filter: blur(100px);
    opacity: 0.1;
  }

  .hero-orb {
    animation: none;
    opacity: 0.6;
  }

  #bg-canvas {
    display: none;
  }
}

/* ── Layout ─────────────────────────────────────────────── */

.header,
main,
.footer {
  position: relative;
  z-index: 1;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(7, 8, 15, 0.82) 0%, rgba(7, 8, 15, 0.45) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.5rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}

.logo img {
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(109, 132, 255, 0.3);
}

.nav {
  display: flex;
  gap: 1.75rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s, text-shadow 0.2s;
}

.nav a:hover {
  color: var(--text);
  text-shadow: 0 0 12px var(--accent-glow);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  position: relative;
  text-align: center;
  padding: 5rem 0 4rem;
  overflow: hidden;
}

.hero > :not(.hero-orb):not(.hero-brackets) {
  position: relative;
  z-index: 1;
}

.hero-brackets {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bracket {
  position: absolute;
  top: 50%;
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  color: rgba(245, 245, 242, 0.06);
  line-height: 1;
  transform: translateY(-50%);
  animation: float-bracket 6s ease-in-out infinite;
}

.bracket--left { left: 2%; }
.bracket--right { right: 2%; animation-delay: -3s; }

@keyframes float-bracket {
  0%, 100% { transform: translateY(-50%) translateX(0); opacity: 0.06; }
  50% { transform: translateY(calc(-50% - 12px)) translateX(4px); opacity: 0.1; }
}

.hero-eyebrow {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 1.25rem;
}

.accent {
  background: linear-gradient(135deg, var(--accent) 0%, #a5b4ff 50%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.hero-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.flow-arrow {
  color: var(--accent);
  opacity: 0.7;
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: #fff;
}

.btn--download {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: #fff;
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

.btn--download:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.glow-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 24px var(--accent-glow),
    0 0 48px rgba(77, 107, 254, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

.glow-btn:not(:disabled):active {
  transform: translateY(0);
}

/* ── Fade-in animations ─────────────────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fade-up 0.7s ease forwards;
}

.fade-in--1 { animation-delay: 0.1s; }
.fade-in--2 { animation-delay: 0.2s; }
.fade-in--3 { animation-delay: 0.35s; }
.fade-in--4 { animation-delay: 0.5s; }

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Sections ───────────────────────────────────────────── */

.section-label {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  text-align: center;
}

.features,
.providers,
.setup,
.download {
  padding: 3.5rem 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.feature-card:hover {
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 0 30px rgba(109, 132, 255, 0.12);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 16px var(--accent-glow);
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Providers ──────────────────────────────────────────── */

.provider-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.provider-chip {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  transition: all 0.25s;
}

.provider-chip:hover {
  color: var(--text);
  border-color: var(--border);
  box-shadow: 0 0 16px rgba(109, 132, 255, 0.15);
}

.provider-chip--accent {
  color: var(--accent);
  border-color: rgba(109, 132, 255, 0.35);
  background: rgba(109, 132, 255, 0.08);
  box-shadow: 0 0 20px rgba(109, 132, 255, 0.12);
}

/* ── Setup ──────────────────────────────────────────────── */

.setup-steps {
  list-style: none;
  max-width: 560px;
  margin: 0 auto;
  counter-reset: steps;
}

.setup-steps li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.setup-steps li:last-child {
  border-bottom: none;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(109, 132, 255, 0.12);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.setup-steps code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
  color: var(--text);
}

.setup-steps strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Download ───────────────────────────────────────────── */

.download-card {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  text-align: center;
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.download-glow {
  position: absolute;
  top: -60%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(109, 132, 255, 0.2) 0%, transparent 70%);
  pointer-events: none;
  animation: hero-breathe 6s ease-in-out infinite;
}

.download-card h2 {
  position: relative;
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.download-meta {
  position: relative;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.75rem;
}

.turnstile-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
  min-height: 65px;
}

.download-note {
  position: relative;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.download-note.is-ready {
  color: #34d399;
}

.download-note.is-error {
  color: #f87171;
}

.download-success {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fade-up 0.45s ease forwards;
}

.download-success[hidden] {
  display: none !important;
}

.download-success h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.download-success-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

.ok-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #34d399;
  margin-bottom: 0.85rem;
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.15);
}

.pwd-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1.1rem;
  background: rgba(109, 132, 255, 0.1);
  border: 1px solid rgba(109, 132, 255, 0.28);
  border-radius: 10px;
  text-align: left;
}

.pwd-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.pwd-value {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #b4bbff;
  letter-spacing: 0.03em;
}

.pwd-copy {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.pwd-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px var(--accent-glow);
}

.pwd-copy.copied {
  background: #34d399;
}

.inst-steps {
  list-style: none;
  width: 100%;
  text-align: left;
  margin-bottom: 1rem;
}

.inst-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.86rem;
  color: var(--text-muted);
}

.inst-steps li:last-child {
  border-bottom: none;
}

.inst-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(109, 132, 255, 0.12);
  border: 1px solid rgba(109, 132, 255, 0.25);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.inst-steps code {
  font-family: var(--mono);
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
  color: var(--text);
}

.btn--ghost {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--border);
  transform: translateY(-1px);
}

/* ── Footer ─────────────────────────────────────────────── */

.footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer-copy {
  margin-top: 0.4rem;
  opacity: 0.5;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 640px) {
  .nav {
    gap: 1rem;
  }

  .nav a {
    font-size: 0.82rem;
  }

  .hero {
    padding-top: 3rem;
  }

  .bracket {
    display: none;
  }
}
