:root {
  color-scheme: dark;
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --display: "Unbounded", var(--font);
  --bg: #07080c;
  --bg-elevated: #12141a;
  --surface: #14171f;
  --surface-hover: #1a1e28;
  --text: #ffffff;
  --muted: rgba(235, 235, 245, 0.68);
  --muted-2: rgba(235, 235, 245, 0.4);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #1689ff;
  --nav-bg: rgba(16, 18, 24, 0.92);
  --radius: 18px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --safe-top: max(16px, env(safe-area-inset-top));
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
  --safe-left: max(16px, env(safe-area-inset-left));
  --safe-right: max(16px, env(safe-area-inset-right));
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--safe-top) + 80px);
}

html,
body {
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* Static gradients only — no animated blur layers (mobile-friendly) */
body {
  background:
    radial-gradient(55% 45% at 18% 42%, rgba(28, 78, 180, 0.28), transparent 70%),
    radial-gradient(50% 40% at 82% 48%, rgba(88, 42, 160, 0.24), transparent 68%),
    radial-gradient(70% 50% at 50% -8%, rgba(22, 137, 255, 0.1), transparent 55%),
    var(--bg);
}

.ambient {
  display: none;
}

.site-nav {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: min(calc(100% - 24px), 760px);
  border-radius: 999px;
  background: var(--nav-bg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateX(-50%) translateY(-14px);
}

html.motion-on .site-nav {
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out),
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}

html.motion-on .site-nav.is-in {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.site-nav.is-scrolled {
  background: rgba(12, 14, 20, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-container {
  padding: 8px 10px 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.88;
}

.logo img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 9px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(108px + var(--safe-top)) 0 calc(56px + var(--safe-bottom));
  overflow: hidden;
}

.hero-watermark {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(4.5rem, 18vw, 12rem);
  letter-spacing: -0.06em;
  line-height: 0.9;
  color: rgba(255, 255, 255, 0.045);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

/* Hero entrance: hidden until motion.js enables transitions, then fades in */
.hero-brand,
.hero h1,
.hero-subtitle,
.hero-buttons {
  opacity: 0;
  transform: translateY(28px);
}

html.motion-on .hero-brand,
html.motion-on .hero h1,
html.motion-on .hero-subtitle,
html.motion-on .hero-buttons {
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

html.motion-on .hero-brand { transition-delay: 0.05s; }
html.motion-on .hero h1 { transition-delay: 0.16s; }
html.motion-on .hero-subtitle { transition-delay: 0.28s; }
html.motion-on .hero-buttons { transition-delay: 0.4s; }

.hero-brand.is-in,
.hero h1.is-in,
.hero-subtitle.is-in,
.hero-buttons.is-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-brand img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.4vw, 1.08rem);
  line-height: 1.55;
  color: var(--muted);
  font-weight: 450;
  margin: 0 auto 28px;
  max-width: 42rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    opacity 0.25s ease;
}

.btn:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-2px);
  }
}

.btn-primary {
  background: #ffffff;
  color: #0a0b10;
  border-color: #ffffff;
}

.btn-primary:hover {
  background: #f0f2f8;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.section {
  padding: 28px 0 56px;
}

.section-header {
  margin-bottom: 22px;
  max-width: 36rem;
}

.section-header h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3.8vw, 2rem);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 450;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.feature-card {
  padding: 18px 16px 16px;
  transition: transform 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .feature-card.is-in:hover {
    transform: translateY(-3px);
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.14);
  }

  .feature-card.is-in:hover .feature-icon {
    transform: scale(1.06);
    background: rgba(255, 255, 255, 0.1);
  }
}

.feature-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.feature-icon,
.download-icon,
.emoji-white {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease), background 0.25s ease;
}

.feature-icon svg,
.download-icon svg,
.emoji-white svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: #ffffff;
  stroke: #ffffff;
}

.feature-card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.feature-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 450;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px) {
  .download-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.download-card {
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .download-card.is-in:hover {
    transform: translateY(-3px);
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.14);
  }

  .download-card.is-in:hover .download-icon {
    transform: scale(1.06);
  }
}

.download-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  margin-bottom: 14px;
}

.download-icon svg {
  width: 22px;
  height: 22px;
}

.download-card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.download-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 450;
  margin-bottom: 16px;
  flex: 1;
}

.download-card .btn {
  width: 100%;
}

.footer {
  padding: 16px 0 calc(36px + var(--safe-bottom));
}

.footer-card {
  padding: 22px 18px;
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-logo img {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.footer-text {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 14px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.6;
}

.footer-copy a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-copy a:hover {
  color: var(--text);
}

/* Scroll reveal — only opacity + transform, transitions enabled after .motion-on */
.reveal,
.reveal-scale {
  opacity: 0;
  transform: translateY(24px);
}

html.motion-on .reveal,
html.motion-on .reveal-scale {
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out);
  transition-delay: calc(var(--reveal-delay, 0) * 1ms);
}

.reveal.is-in,
.reveal-scale.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Lighter stagger on desktop grid; keep short on mobile via smaller delays */
.features-grid .feature-card:nth-child(1) { --reveal-delay: 0; }
.features-grid .feature-card:nth-child(2) { --reveal-delay: 50; }
.features-grid .feature-card:nth-child(3) { --reveal-delay: 100; }
.features-grid .feature-card:nth-child(4) { --reveal-delay: 0; }
.features-grid .feature-card:nth-child(5) { --reveal-delay: 50; }
.features-grid .feature-card:nth-child(6) { --reveal-delay: 100; }
.features-grid .feature-card:nth-child(7) { --reveal-delay: 0; }
.features-grid .feature-card:nth-child(8) { --reveal-delay: 50; }
.features-grid .feature-card:nth-child(9) { --reveal-delay: 100; }
.features-grid .feature-card:nth-child(10) { --reveal-delay: 0; }
.features-grid .feature-card:nth-child(11) { --reveal-delay: 50; }
.features-grid .feature-card:nth-child(12) { --reveal-delay: 100; }

.download-grid .download-card:nth-child(1) { --reveal-delay: 0; }
.download-grid .download-card:nth-child(2) { --reveal-delay: 70; }
.download-grid .download-card:nth-child(3) { --reveal-delay: 140; }

@media (max-width: 720px) {
  .site-nav {
    width: min(calc(100% - 20px), 760px);
    border-radius: 22px;
  }

  .nav-container {
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-top: 6px;
  }

  .site-nav.is-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 12px;
  }

  .hero {
    padding-top: calc(96px + var(--safe-top));
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .page {
    padding: 0 16px;
  }

  /* No stagger cost on phones — one shared delay */
  .features-grid .feature-card,
  .download-grid .download-card {
    --reveal-delay: 0;
  }

  html.motion-on .reveal,
  html.motion-on .reveal-scale {
    transition-duration: 0.4s;
  }
}

@media (max-width: 380px) {
  .logo span {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-nav,
  .hero-brand,
  .hero h1,
  .hero-subtitle,
  .hero-buttons,
  .reveal,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .site-nav {
    transform: translateX(-50%) !important;
  }
}
