:root {
  color-scheme: dark;

  --bg: #0b0a1a;
  --bg-raised: #131130;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f2ff;
  --muted: #aaa4cc;
  --faint: #7b75a0;

  --violet: #8b6cff;
  --violet-deep: #4b2fb8;
  --pink: #ff5f87;
  --amber: #f7b538;
  --gradient: linear-gradient(100deg, #a68bff 0%, #ff6f95 52%, #ffbf4d 100%);

  --radius: 22px;
  --radius-small: 12px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "JetBrains Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.08; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  white-space: nowrap;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7em;
  height: 1.7em;
  padding: 0 0.42em;
  font-family: var(--font);
  font-size: 0.82em;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 7px;
  vertical-align: 0.08em;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-narrow { max-width: calc(780px + 2 * var(--gutter)); }

/* ---------- Backdrop ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
}
.blob-violet { width: 60vmax; height: 60vmax; left: -18vmax; top: -24vmax; background: #3b23a8; animation: drift 26s ease-in-out infinite alternate; }
.blob-pink { width: 38vmax; height: 38vmax; right: -12vmax; top: 6vmax; background: #a62c74; opacity: 0.32; animation: drift 32s ease-in-out infinite alternate-reverse; }
.blob-amber { width: 30vmax; height: 30vmax; right: 18vmax; top: 48vmax; background: #a8641a; opacity: 0.16; animation: drift 38s ease-in-out infinite alternate; }
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 10, 26, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 30px; font-size: 15px; color: var(--muted); }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.icon-link { color: var(--muted); display: inline-flex; padding: 6px; transition: color 0.2s; }
.icon-link:hover { color: var(--text); }

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.btn:active { transform: scale(0.98); }
.btn-small { height: 38px; padding: 0 18px; font-size: 14px; background: var(--text); color: #15112e; }
.btn-small:hover { background: #fff; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #7c5cff 0%, #a347e6 55%, #e8508f 100%);
  box-shadow: 0 10px 30px -10px rgba(139, 108, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(160, 100, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-ghost { color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface-strong); border-color: rgba(255, 255, 255, 0.28); }
.btn-large { height: 60px; padding: 0 34px; font-size: 18px; }

/* ---------- Hero ---------- */

.hero { padding: clamp(48px, 9vw, 104px) 0 0; text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  margin-bottom: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.hero h1 {
  font-size: clamp(42px, 8.2vw, 88px);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.02;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  max-width: 640px;
  margin-top: 26px;
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.55;
  color: var(--muted);
}
.keys { display: inline-flex; gap: 5px; margin-left: 4px; white-space: nowrap; }
.keys kbd { font-size: 0.86em; }
.js .hero .keys kbd { animation: press 4.8s ease-in-out infinite; }
.js .hero .keys kbd:nth-child(2) { animation-delay: 0.08s; }
.js .hero .keys kbd:nth-child(3) { animation-delay: 0.16s; }
@keyframes press {
  0%, 82%, 100% { transform: translateY(0); border-bottom-width: 2px; background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.05)); }
  86%, 90% { transform: translateY(1.5px); border-bottom-width: 1px; background: linear-gradient(180deg, rgba(166,139,255,0.5), rgba(166,139,255,0.2)); }
}
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 38px; }
.meta { margin-top: 20px; font-size: 14px; color: var(--faint); }
.placeholder-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--amber);
  opacity: 0.85;
}

.showcase {
  position: relative;
  max-width: 1000px;
  margin: clamp(48px, 7vw, 80px) auto 0;
}
.showcase-glow {
  position: absolute;
  inset: 8% 4% -6%;
  background: var(--gradient);
  filter: blur(80px);
  opacity: 0.38;
  border-radius: 40px;
}
.showcase-stage {
  border-radius: clamp(14px, 2vw, 24px);
  border-color: var(--border-strong);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.showcase-stage .palette { cursor: default; }

/* ---------- Facts ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: clamp(56px, 8vw, 96px);
}
.fact {
  padding: 24px;
  text-align: left;
  border-top: 1px solid var(--border-strong);
}
.fact strong {
  display: block;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fact span { display: block; margin-top: 10px; font-size: 15px; color: var(--muted); line-height: 1.4; }

/* ---------- Sections ---------- */

.section { padding: clamp(80px, 12vw, 140px) 0 0; }
.section-tight { padding-top: clamp(64px, 9vw, 110px); }
.section-head { max-width: 860px; margin-bottom: clamp(36px, 5vw, 56px); }
.kicker {
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}
.section h2 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 720; letter-spacing: -0.04em; }
.section-lede { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 620px; }

/* ---------- Modules ---------- */

.modules {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: start;
}
.module-tabs { display: flex; flex-direction: column; gap: 4px; }
.module-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  text-align: left;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.module-tab:hover { background: var(--surface); color: var(--text); }
.module-tab:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.module-tab[aria-selected="true"] { background: var(--surface-strong); border-color: var(--border); color: var(--text); }
.prefix {
  flex: none;
  width: 38px;
  height: 34px;
  font-family: var(--mono);
  font-size: 15px;
  border-radius: 9px;
  vertical-align: middle;
}
.module-tab[aria-selected="true"] .prefix {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #7c5cff, #c04fd0);
  box-shadow: 0 6px 18px -6px rgba(139, 108, 255, 0.9);
}
.tab-text { display: flex; flex-direction: column; min-width: 0; }
.tab-name { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.tab-hint { font-size: 13px; color: var(--faint); line-height: 1.35; }
.tab-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--gradient);
  opacity: 0;
}
.module-tab[aria-selected="true"] .tab-progress { opacity: 1; }
.modules.is-auto .module-tab[aria-selected="true"] .tab-progress { animation: progress var(--cycle, 6s) linear forwards; }
.modules.is-paused .module-tab[aria-selected="true"] .tab-progress { animation-play-state: paused; }
@keyframes progress { from { width: 0; } to { width: 100%; } }

.module-stage { position: sticky; top: 92px; }
.module-panels { margin-top: 22px; min-height: 128px; }
.module-panel p { font-size: 17px; color: var(--muted); max-width: 680px; }
.module-panel.is-active { animation: fade-up 0.45s ease both; }
.shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--faint);
}
.shortcuts li { display: inline-flex; align-items: center; gap: 8px; }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Cards / bento ---------- */

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.card:hover { border-color: var(--border-strong); }
.card-wide { grid-column: span 3; }
.card-copy { padding: 28px 28px 22px; }
.card h3 { font-size: 22px; font-weight: 680; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card p { margin-top: 10px; font-size: 15.5px; color: var(--muted); }
.tag {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 3px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}

/* ---------- Privacy ---------- */

.privacy {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(32px, 6vw, 80px);
  padding: clamp(32px, 6vw, 64px);
  border-radius: 32px;
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(124, 92, 255, 0.22), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(247, 181, 56, 0.12), transparent 60%),
    rgba(255, 255, 255, 0.02);
}
.privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 28px; }
.privacy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  color: var(--amber);
  background: rgba(247, 181, 56, 0.1);
  border: 1px solid rgba(247, 181, 56, 0.25);
}
.privacy-item h3 { font-size: 18px; font-weight: 650; letter-spacing: -0.015em; }
.privacy-item p { margin-top: 8px; font-size: 15px; color: var(--muted); }

/* ---------- Make it yours ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card-code { grid-column: auto; }
.code-window {
  margin: auto 28px 28px;
  border-radius: 14px;
  background: rgba(8, 7, 20, 0.75);
  border: 1px solid var(--border);
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.code-bar span { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.code-bar span:nth-child(1) { background: #ff5f57; }
.code-bar span:nth-child(2) { background: #febc2e; }
.code-bar span:nth-child(3) { background: #28c840; }
.code-bar em { margin-left: 8px; font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-window pre {
  margin: 0;
  padding: 18px 20px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  color: #d9d4f5;
}
.code-window pre code { padding: 0; border: 0; background: none; font-size: inherit; white-space: pre; }
.c-k { color: #b9a3ff; }
.c-s { color: #ffc46b; }
.c-c { color: #6f6995; }

/* ---------- Download ---------- */

.download {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 64px);
  border-radius: 36px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(43, 32, 110, 0.55), rgba(20, 16, 48, 0.55));
  overflow: hidden;
}
.download-glow {
  position: absolute;
  top: -160px;
  left: 50%;
  width: 520px;
  height: 360px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(166, 139, 255, 0.55), transparent);
  filter: blur(20px);
}
.download > :not(.download-glow) { position: relative; }
.download-icon {
  width: 120px;
  height: 120px;
  margin-bottom: 28px;
  filter: drop-shadow(0 20px 40px rgba(80, 40, 200, 0.6));
}
.js .download.is-in .download-icon { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.download .section-lede { margin: 16px auto 34px; }
.download-meta { margin-top: 16px; font-size: 14px; color: var(--faint); }
.checksum {
  margin-top: 8px;
  max-width: 100%;
  font-size: 12px;
  color: var(--faint);
}
.checksum code { font-size: 11px; white-space: normal; word-break: break-all; }
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 940px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.steps li {
  display: flex;
  gap: 12px;
  padding: 18px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.steps li > span {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 13px;
  font-weight: 700;
  color: #15112e;
  background: var(--amber);
  border-radius: 50%;
}
.steps strong { color: var(--text); font-weight: 600; }
.steps kbd { font-size: 0.78em; }
.source-note { margin-top: 32px; font-size: 15px; color: var(--muted); }
.source-note a { color: var(--text); border-bottom: 1px solid var(--border-strong); transition: border-color 0.2s; }
.source-note a:hover { border-color: var(--text); }

/* ---------- FAQ ---------- */

.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: background 0.2s, border-color 0.2s;
}
.faq details[open] { background: var(--surface-strong); border-color: var(--border-strong); }
.faq summary {
  position: relative;
  padding: 20px 56px 20px 22px;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.25s, margin-top 0.25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 16px; }
.faq details p { padding: 0 22px 22px; color: var(--muted); font-size: 16px; }

/* ---------- Footer ---------- */

.footer { margin-top: clamp(80px, 12vw, 140px); border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 32px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
  font-size: 14px;
  color: var(--faint);
}
.footer nav { display: flex; gap: 22px; }
.footer nav a:hover { color: var(--text); }

/* ---------- Reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .nav-links { display: none; }
  .modules { grid-template-columns: 1fr; gap: 18px; }
  .module-stage { position: static; order: 2; }
  .module-tabs {
    order: 1;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    margin: 0 calc(-1 * var(--gutter));
    padding: 2px var(--gutter) 6px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .module-tabs::-webkit-scrollbar { display: none; }
  .module-tab { width: auto; flex: none; padding: 8px 14px 8px 8px; scroll-snap-align: start; border-color: var(--border); }
  .tab-hint { display: none; }
  .prefix { width: 32px; height: 30px; font-size: 14px; }
  .privacy { grid-template-columns: 1fr; }
  .card, .card-wide { grid-column: span 3; }
  .bento > .card:last-child { grid-column: span 6; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav-inner { height: 60px; }
  .bento, .split { grid-template-columns: 1fr; }
  .card, .card-wide, .bento > .card:last-child { grid-column: auto; }
  .privacy-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .fact { padding: 18px 4px; }
  .fact strong { font-size: 32px; }
  .cta-row { width: 100%; }
  .cta-row .btn { flex: 1 1 100%; }
  .card-copy { padding: 24px 22px 18px; }
  .code-window { margin: auto 16px 16px; }
  .code-window pre { font-size: 12.5px; padding: 14px 16px 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
