@font-face {
  font-family: "Bureau Grotesque";
  src: url("assets/fonts/BureauGrotesque-SevenNine.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050508;
  --ink: #f4f2f8;
  --muted: rgba(255, 255, 255, 0.58);
  --hairline: rgba(255, 255, 255, 0.09);
  --purple: #9b7bff;
  --purple-deep: #6e5eff;
  --purple-glow: rgba(139, 92, 255, 0.45);
  --card: rgba(255, 255, 255, 0.03);
  --max: 1180px;
  --font-display: "Bureau Grotesque", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

::selection {
  background: rgba(155, 123, 255, 0.35);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* ---- Background ---- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #030208;
}

.bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.bg-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(5, 5, 8, 0.97) 0%, rgba(5, 5, 8, 0.88) 40%, rgba(5, 5, 8, 0.42) 62%, rgba(5, 5, 8, 0.18) 100%),
    linear-gradient(to bottom, transparent 72%, rgba(5, 5, 8, 0.96) 100%);
}

.bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
}

.shell {
  position: relative;
  z-index: 1;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(5, 5, 8, 0.55);
  border-bottom: 1px solid transparent;
  transition:
    border-color 220ms var(--ease-out),
    background-color 220ms var(--ease-out);
}

.nav.scrolled {
  border-bottom-color: var(--hairline);
  background: rgba(5, 5, 8, 0.82);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  transition: opacity 160ms var(--ease-out);
}

.nav-logo:active {
  opacity: 0.72;
}

.nav-logo img,
.nav-logo svg {
  height: 28px;
  width: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.wordmark {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark span {
  color: var(--purple);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple-deep), #8a2bff);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(110, 94, 255, 0.35);
  transition:
    transform 160ms var(--ease-out),
    box-shadow 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .nav-cta:hover {
    box-shadow: 0 12px 36px rgba(110, 94, 255, 0.5);
  }
}

.nav-cta:active {
  transform: scale(0.97);
}

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  min-height: calc(100dvh - 68px);
  padding: clamp(48px, 8vh, 96px) 0 clamp(64px, 10vh, 96px);
}

.hero-copy {
  animation: rise 640ms var(--ease-out) both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #c4b5fd, var(--purple), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .lede {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 36px;
  text-wrap: pretty;
}

/* Waitlist */
.coming-soon {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: rise 640ms var(--ease-out) 80ms both;
}

.waitlist {
  position: relative;
  max-width: 420px;
  animation: rise 640ms var(--ease-out) 80ms both;
}

.waitlist-field {
  display: flex;
  align-items: center;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.25);
  transition:
    box-shadow 220ms var(--ease-out),
    background-color 220ms var(--ease-out),
    opacity 180ms var(--ease-out),
    transform 180ms var(--ease-out),
    max-height 220ms var(--ease-out),
    padding 220ms var(--ease-out);
}

.waitlist-field:focus-within {
  background: rgba(110, 94, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(155, 123, 255, 0.35),
    0 12px 48px rgba(110, 94, 255, 0.15);
}

.waitlist input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 18px;
  outline: none;
}

.waitlist input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.waitlist button {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  min-height: 44px;
  background: linear-gradient(135deg, var(--purple-deep), #8a2bff);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(110, 94, 255, 0.35);
  transition:
    transform 160ms var(--ease-out),
    box-shadow 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .waitlist button:hover {
    box-shadow: 0 10px 28px rgba(110, 94, 255, 0.5);
  }
}

.waitlist button:active {
  transform: scale(0.97);
}

.waitlist-field.is-hidden {
  opacity: 0;
  transform: translateY(-4px);
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    opacity 180ms var(--ease-out),
    transform 180ms var(--ease-out),
    max-height 220ms var(--ease-out),
    padding 220ms var(--ease-out);
}

.note {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  text-wrap: pretty;
}

.success {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  color: #b8f0d0;
  background: rgba(59, 179, 123, 0.12);
  box-shadow: inset 0 0 0 1px rgba(59, 179, 123, 0.3);
  transition:
    opacity 220ms var(--ease-out),
    max-height 260ms var(--ease-out),
    margin-top 220ms var(--ease-out),
    padding 220ms var(--ease-out);
}

.success.show {
  max-height: 64px;
  opacity: 1;
  margin-top: 14px;
  padding: 14px 18px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.waitlist-error {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 999px;
  font-size: 14px;
  color: #ffb4b4;
  background: rgba(255, 90, 90, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 120, 120, 0.28);
}

.waitlist button:disabled {
  opacity: 0.72;
  cursor: wait;
}

/* Device */
.hero-device {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: rise 640ms var(--ease-out) 48ms both;
}

.device-glow {
  position: absolute;
  width: 90%;
  height: 70%;
  top: 15%;
  left: 5%;
  background: radial-gradient(ellipse at center, var(--purple-glow), transparent 68%);
  filter: blur(36px);
  pointer-events: none;
}

.device-wrap {
  position: relative;
  width: min(530px, 66vw);
  animation: float 9s var(--ease-in-out) infinite;
  will-change: transform;
}

.device-mockup {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.55));
}

/* ---- Features ---- */
.features {
  padding: 0 0 clamp(72px, 10vh, 100px);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 28px;
  border-radius: 24px;
  background: var(--card);
  box-shadow:
    inset 0 0 0 1px var(--hairline),
    0 24px 64px rgba(0, 0, 0, 0.35);
  animation: rise 640ms var(--ease-out) 140ms both;
}

.feature {
  padding: 20px 16px;
  border-radius: 16px;
  text-align: center;
  transition: background-color 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .feature:hover {
    background: rgba(255, 255, 255, 0.03);
  }
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(110, 94, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(155, 123, 255, 0.2);
}

.feature h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.feature p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---- Footer ---- */
.site-footer {
  padding-bottom: clamp(32px, 5vh, 48px);
  animation: rise 640ms var(--ease-out) 200ms both;
}

.footer-sep {
  height: 1px;
  background: var(--hairline);
  margin-bottom: 24px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-brand .wordmark {
  font-size: 1.15rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  transition: opacity 160ms var(--ease-out);
}

.footer-logo:active {
  opacity: 0.72;
}

.footer-logo img {
  height: 22px;
  width: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  transition: color 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .footer-nav a:hover {
    color: var(--ink);
  }
}

.footer-nav .dot {
  color: rgba(255, 255, 255, 0.2);
}

/* ---- Mist shader overlay ---- */
.mist-layer {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: soft-light;
  opacity: 0.45;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 40px;
    text-align: center;
  }

  .hero .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .coming-soon {
    margin-left: auto;
    margin-right: auto;
  }

  .note {
    text-align: center;
  }

  .hero-device {
    order: -1;
  }

  .device-wrap {
    width: min(300px, 78vw);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px;
  }

  .footer-row {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .device-wrap {
    will-change: auto;
  }

  .mist-layer {
    opacity: 0.35;
  }
}
