:root {
  --bg: #07080b;
  --bg-2: #0d0f14;
  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #f4f6fb;
  --muted: #a3abbb;
  --faint: #6b7385;
  --teal: #2ee6b6;
  --blue: #1fa3e0;
  --violet: #7c5cf5;
  --gradient: linear-gradient(120deg, var(--teal), var(--blue) 55%, var(--violet));
  --radius: 22px;
  --max: 1160px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* Drifting glows behind everything */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: 0.22; mix-blend-mode: screen;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: var(--teal); top: -25vmax; left: -15vmax; }
.aurora span:nth-child(2) { background: var(--violet); top: 10vmax; right: -25vmax; animation-duration: 32s; animation-delay: -8s; }
.aurora span:nth-child(3) { background: var(--blue); bottom: -35vmax; left: 20vmax; animation-duration: 38s; animation-delay: -16s; opacity: 0.14; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 4vmax) scale(1.08); }
  100% { transform: translate(-4vmax, 8vmax) scale(0.95); }
}

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: rgba(7, 8, 11, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 26px; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 640px) { .nav-links a:not(.keep) { display: none; } }

/* Buttons and pills */
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; text-decoration: none;
  background: var(--gradient); color: #031014;
  box-shadow: 0 10px 40px -10px rgba(46, 230, 182, 0.55);
  transition: transform 0.2s, box-shadow 0.2s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -12px rgba(46, 230, 182, 0.7); }
.button.ghost { background: var(--card); color: var(--text); border: 1px solid var(--card-border); box-shadow: none; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--muted);
  background: var(--card); border: 1px solid var(--card-border);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Hero */
.hero { padding: 84px 0 40px; text-align: center; }
.hero .icon {
  width: 112px; height: 112px; margin: 0 auto 26px; border-radius: 26px;
  box-shadow: 0 30px 80px -20px rgba(31, 163, 224, 0.6);
  animation: float 6s ease-in-out infinite;
}
.hero h1 { font-size: clamp(42px, 7vw, 84px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; }
.hero p.lead { font-size: clamp(18px, 2.2vw, 22px); color: var(--muted); max-width: 640px; margin: 22px auto 34px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .meta { margin-top: 18px; font-size: 14px; color: var(--faint); }

/* Device stage */
.stage {
  position: relative; margin: 70px auto 0; width: 100%; max-width: 1180px; aspect-ratio: 1180 / 860;
  perspective: 1600px;
}
.stage .device { position: absolute; filter: drop-shadow(0 50px 70px rgba(0, 0, 0, 0.55)); transition: transform 0.4s ease-out; will-change: transform; }
.stage .mac { width: 78%; left: 11%; top: 4%; animation: float 9s ease-in-out infinite; }
.stage .iphone { width: 17%; right: 3%; top: 26%; animation: float 7s ease-in-out infinite; animation-delay: -2s; }
.stage .iphone.left { right: auto; left: 3%; top: 34%; width: 15%; animation-delay: -4s; }
@keyframes float { 50% { translate: 0 -14px; } }

/* Sections */
section { padding: 110px 0; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }
h2 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.08; letter-spacing: -0.03em; margin: 12px 0 18px; font-weight: 800; }
.section-lead { color: var(--muted); font-size: 19px; max-width: 620px; }
.center { text-align: center; }
.center .section-lead { margin-inline: auto; }

/* Feature grid */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 54px; }
.card {
  position: relative; padding: 28px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  overflow: hidden; transition: transform 0.3s, border-color 0.3s;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(46, 230, 182, 0.45), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s;
}
.card:hover { transform: translateY(-4px); }
.card:hover::before { opacity: 1; }
.card .glyph {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(46, 230, 182, 0.18), rgba(124, 92, 245, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.card .glyph svg { width: 24px; height: 24px; stroke: var(--text); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 20px; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 16px; }

/* Showcase rows */
.showcase { display: grid; grid-template-columns: 1.05fr 1fr; gap: 70px; align-items: center; }
.showcase.flip { grid-template-columns: 1fr 1.05fr; }
.showcase.flip .visual { order: 2; }
.showcase .visual { position: relative; display: flex; justify-content: center; }
.showcase .visual::before {
  content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: var(--gradient); filter: blur(90px); opacity: 0.28; z-index: -1; top: 15%;
}
.showcase .visual img { width: min(300px, 70%); filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.55)); }
.showcase .visual img.wide { width: min(640px, 100%); }
.checks { list-style: none; margin-top: 26px; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; color: var(--muted); }
.checks li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--gradient) padding-box;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 7px var(--bg);
}
.checks strong { color: var(--text); font-weight: 600; }
@media (max-width: 860px) {
  .showcase, .showcase.flip { grid-template-columns: 1fr; gap: 40px; }
  .showcase.flip .visual { order: 0; }
}

/* Device gallery */
.gallery { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; margin-top: 56px; position: relative; }
.gallery::before { content: ""; position: absolute; inset: 10% 15%; background: var(--gradient); filter: blur(110px); opacity: 0.22; z-index: -1; border-radius: 50%; }
.gallery img { width: 100%; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.5)); }
@media (max-width: 860px) { .gallery { grid-template-columns: 1fr; } }

/* OS strip */
.os-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 44px; }
.os {
  display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--card-border); font-weight: 600;
  transition: transform 0.3s;
}
.os:hover { transform: translateY(-3px) scale(1.03); }
.os img, .os svg { width: 30px; height: 30px; object-fit: contain; }

/* Marquee of capabilities */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); margin-top: 60px; }
.marquee .track { display: flex; gap: 12px; width: max-content; animation: scroll 40s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Privacy band */
.band {
  border-radius: 32px; padding: clamp(32px, 6vw, 70px);
  background: linear-gradient(135deg, rgba(46, 230, 182, 0.1), rgba(124, 92, 245, 0.12)), var(--bg-2);
  border: 1px solid var(--card-border);
}

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

/* Footer */
footer { padding: 60px 0 80px; color: var(--faint); font-size: 14px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
footer nav { display: flex; gap: 22px; }
footer a { text-decoration: none; color: var(--muted); }
footer a:hover { color: var(--text); }

/* Long-form pages */
.doc { max-width: 760px; padding: 70px 0 100px; }
.doc h1 { font-size: clamp(36px, 5vw, 54px); letter-spacing: -0.03em; margin-bottom: 10px; }
.doc .updated { color: var(--faint); margin-bottom: 40px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--muted); }
.doc ul { padding-left: 22px; display: grid; gap: 8px; margin-top: 10px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; } .reveal.d2 { transition-delay: 0.16s; } .reveal.d3 { transition-delay: 0.24s; }

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

/* Page changes fade in */
#app { outline: none; }
#app.entering { animation: page-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } }
.nav-links a.active { color: var(--text); }
