:root {
  --bg: #07081a;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f5ff;
  --muted: #a3a8c9;
  --blue: #29b8ff;
  --violet: #8f3dff;
  --brand: linear-gradient(135deg, var(--blue), var(--violet));
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
/* Grid children default to their content's width, which lets a long word or the
   tilted demo push the page wider than a phone. */
.hero > *, .grid > *, .security > *, .stats > * { min-width: 0; }
h1, h2 { overflow-wrap: break-word; }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.glow {
  position: fixed;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  animation: drift 22s ease-in-out infinite alternate;
}
.glow-a { background: var(--blue); top: -25vmax; left: -20vmax; }
.glow-b { background: var(--violet); bottom: -30vmax; right: -20vmax; animation-delay: -11s; }

@keyframes drift {
  to { transform: translate(8vmax, 6vmax) scale(1.1); }
}

.nav, main, footer { position: relative; z-index: 1; }

.nav {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px max(24px, 6vw);
  backdrop-filter: blur(18px) saturate(1.4);
  background: rgba(7, 8, 26, 0.6);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand img { border-radius: 8px; }
.nav nav { display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--muted); }
.nav nav a:hover { color: var(--text); }

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-weight: 600;
  box-shadow: 0 10px 40px rgba(110, 90, 255, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 16px 50px rgba(110, 90, 255, 0.6); }
.button.small { padding: 9px 18px; box-shadow: none; color: white; }
.button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

main { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 56px;
  min-height: calc(100vh - 70px);
  padding: 60px 0;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 22px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 12px #3ddc84; }

h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 22px; font-weight: 800; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 18px; font-weight: 700; }
h3 { margin: 14px 0 8px; font-size: 19px; letter-spacing: -0.01em; }
.gradient { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--muted); max-width: 540px; margin: 0 0 34px; }
.cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.version { color: var(--muted); font-size: 14px; }

/* The live demo window. */
.demo { perspective: 1400px; }
.window {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(16, 18, 40, 0.75);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  overflow: hidden;
  transform: rotateY(-9deg) rotateX(4deg);
  transition: transform 0.6s;
}
.demo:hover .window { transform: rotateY(-3deg) rotateX(1deg); }
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.lights { display: flex; gap: 7px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.live { display: flex; align-items: center; gap: 6px; color: #3ddc84; font-variant-numeric: tabular-nums; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.screen {
  position: relative;
  aspect-ratio: 16 / 10;
  background: radial-gradient(120% 120% at 0% 0%, #2a3a8f 0%, #4b1d8f 45%, #120c34 100%);
}
.desk { position: absolute; inset: 0; }
.app-window {
  position: absolute;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}
.app-window .bar { height: 18px; border-bottom: 1px solid #e7e8f0; background: #f6f6fa; border-radius: 10px 10px 0 0; }
.w1 { width: 46%; height: 52%; left: 8%; top: 12%; animation: move1 9s ease-in-out infinite; }
.w2 { width: 42%; height: 46%; right: 8%; bottom: 10%; }
.lines { padding: 12px; display: grid; gap: 8px; }
.lines i { height: 7px; border-radius: 4px; background: #dfe1ee; }
.lines i:nth-child(2) { width: 80%; }
.lines i:nth-child(3) { width: 60%; }
.lines i:nth-child(4) { width: 72%; }
.chart { display: flex; align-items: flex-end; gap: 8%; height: calc(100% - 18px); padding: 14px 16px; }
.chart i { flex: 1; border-radius: 4px 4px 0 0; background: var(--brand); animation: grow 3s ease-in-out infinite alternate; }
.chart i:nth-child(1) { height: 40%; } .chart i:nth-child(2) { height: 70%; animation-delay: -0.5s; }
.chart i:nth-child(3) { height: 55%; animation-delay: -1s; } .chart i:nth-child(4) { height: 85%; animation-delay: -1.5s; }
.chart i:nth-child(5) { height: 50%; animation-delay: -2s; } .chart i:nth-child(6) { height: 65%; animation-delay: -2.5s; }
@keyframes grow { to { transform: scaleY(0.6); transform-origin: bottom; } }

.pointer {
  position: absolute;
  width: 26px;
  fill: white;
  stroke: #10123a;
  stroke-width: 1.2;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  animation: pointer 9s ease-in-out infinite;
}
@keyframes pointer {
  0% { left: 70%; top: 70%; }
  20% { left: 30%; top: 18%; }
  45% { left: 48%; top: 30%; }
  70% { left: 48%; top: 30%; }
  100% { left: 70%; top: 70%; }
}
@keyframes move1 {
  0%, 20% { transform: translate(0, 0); }
  45%, 70% { transform: translate(18%, 16%); }
  100% { transform: translate(0, 0); }
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
  margin-bottom: 120px;
}
.stats div { background: rgba(10, 12, 32, 0.92); padding: 28px 24px; }
.stats strong { display: block; font-size: 32px; letter-spacing: -0.02em; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { color: var(--muted); font-size: 14px; }

.features, .steps, .faq { margin-bottom: 130px; }
.features h2, .steps h2, .faq h2 { text-align: center; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; padding: 0; list-style: none; }
.card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(143, 61, 255, 0.45); background: rgba(143, 61, 255, 0.06); }
.card p { color: var(--muted); margin: 0; }
.icon { font-size: 28px; }
.num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand);
  font-weight: 700;
}

.security {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  padding: 60px;
  border-radius: 32px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(41, 184, 255, 0.08), rgba(143, 61, 255, 0.1));
  margin-bottom: 130px;
}
.security p { color: var(--muted); font-size: 18px; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.checks li { padding-left: 32px; position: relative; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center / contain;
}
.lock { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.lock svg { width: 34%; fill: none; stroke: white; stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 0 30px rgba(143, 61, 255, 0.8)); }
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.14); animation: spin 18s linear infinite; }
.r1 { inset: 0; border-top-color: var(--blue); }
.r2 { inset: 14%; border-right-color: var(--violet); animation-duration: 12s; animation-direction: reverse; }
.r3 { inset: 28%; border-bottom-color: var(--blue); animation-duration: 8s; }
@keyframes spin { to { transform: rotate(360deg); } }

.faq { max-width: 780px; margin-left: auto; margin-right: auto; }
.faq h2 { margin-bottom: 36px; }
details {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px 24px;
  margin-bottom: 12px;
}
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin: 12px 0 0; }

.final {
  text-align: center;
  padding: 80px 24px;
  border-radius: 32px;
  border: 1px solid var(--border);
  background: radial-gradient(80% 120% at 50% 0%, rgba(143, 61, 255, 0.25), transparent 70%);
  margin-bottom: 80px;
}
.final img { border-radius: 22px; box-shadow: 0 20px 60px rgba(110, 90, 255, 0.5); }
.final p { color: var(--muted); margin: 0 0 28px; }

footer {
  display: flex;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 24px 50px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

/* Elements rise in as they scroll into view; app.js adds .visible. */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero, .security { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 40px; }
  .grid, .grid.three { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .security { padding: 36px 24px; }
  .lock { max-width: 220px; margin: 0 auto; }
  .nav nav a:not(.button) { display: none; }
  .window { transform: none; }
  h1 { font-size: clamp(34px, 9vw, 44px); }
  .stats div { padding: 20px 16px; }
  .stats strong { font-size: 26px; }
}

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