/* ---------- Reset & tokens ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #08080d;
  --bg-2: #0d0d16;
  --ink: #f2f2f7;
  --ink-dim: #9a9ab0;
  --ink-faint: #5c5c74;
  --violet: #7c5cff;
  --cyan: #4be1e6;
  --pink: #ff5ca8;
  --line: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.035);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(124, 92, 255, 0.4); }

/* ---------- Ambient: aurora ---------- */
.aurora {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(124, 92, 255, 0.14), transparent 60%),
    var(--bg);
}
.aurora-blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.5; will-change: transform;
}
.blob-a {
  width: 55vw; height: 55vw; left: -15vw; top: -20vw;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.35), transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.blob-b {
  width: 45vw; height: 45vw; right: -12vw; top: 10vh;
  background: radial-gradient(circle, rgba(75, 225, 230, 0.22), transparent 65%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
.blob-c {
  width: 40vw; height: 40vw; left: 30vw; bottom: -25vw;
  background: radial-gradient(circle, rgba(255, 92, 168, 0.16), transparent 65%);
  animation: drift-c 38s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(12vw, 10vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-10vw, 18vh) scale(0.9); } }
@keyframes drift-c { to { transform: translate(-14vw, -8vh) scale(1.2); } }

/* ---------- Ambient: grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 40; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05; animation: grain 9s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ---------- Ambient: cursor glow ---------- */
.cursor-glow {
  position: fixed; z-index: -1; pointer-events: none;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.09), transparent 65%);
  transform: translate(-50%, -50%);
  left: 50vw; top: 40vh;
  transition: opacity 0.4s;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 64px);
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 8, 13, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.wordmark {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 9px;
  /* Two-word product wordmarks ("mergonomy voice") are long enough to wrap the
     fixed nav onto two lines on phones, which pushes the nav links and badge
     off-screen. Keep it on one line and shrink it instead — see below. */
  white-space: nowrap;
}
/* Real product mark. Each SVG is an app tile that carries its own dark
   background, so it needs the tile's corner radius rather than a circle. */
.wordmark-logo {
  width: 26px; height: 26px; border-radius: 7px;
  display: block; flex: none;
}
@media (max-width: 560px) {
  .nav { padding-left: 16px; padding-right: 16px; gap: 12px; }
  .wordmark { font-size: 16px; gap: 7px; }
  .wordmark-logo { width: 22px; height: 22px; border-radius: 6px; }
  .nav-links { gap: 16px; }
  /* Decorative only ("for windows" / "legal"). Dropping it is what buys the
     room for the wordmark and the real links at 375px. */
  .nav-badge { display: none; }
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--ink-dim); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--ink); }
.nav-badge {
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid rgba(75, 225, 230, 0.35);
  padding: 5px 11px; border-radius: 999px;
  background: rgba(75, 225, 230, 0.06);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px clamp(20px, 6vw, 80px) 60px;
  position: relative;
}
.hero-kicker {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 26px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 10.5vw, 148px);
  font-weight: 700; line-height: 0.98; letter-spacing: -0.035em;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span {
  display: inline-block; transform: translateY(110%);
  animation: rise 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-title .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero-title .line:nth-child(3) > span { animation-delay: 0.24s; }
@keyframes rise { to { transform: translateY(0); } }

.grad {
  background: linear-gradient(100deg, var(--violet), var(--cyan) 55%, var(--pink));
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 7s ease-in-out infinite;
}
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.hero-sub {
  max-width: 520px; margin-top: 34px;
  font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-dim);
}
.hero-scroll {
  position: absolute; bottom: 36px; left: clamp(20px, 6vw, 80px);
  display: flex; align-items: center; gap: 14px;
}
.scroll-line {
  width: 1px; height: 56px; background: var(--line); position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ""; position: absolute; left: 0; top: -40%;
  width: 100%; height: 40%; background: var(--cyan);
  animation: scrollhint 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes scrollhint { 0% { top: -40%; } 60%, 100% { top: 110%; } }
.scroll-label {
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 18px 0; overflow: hidden; white-space: nowrap;
  background: rgba(255, 255, 255, 0.015);
}
.marquee-track {
  display: inline-flex; align-items: center; gap: 38px;
  padding-right: 38px;
  animation: marquee 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display); font-size: 14px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim);
}
.marquee-track i { color: var(--violet); font-style: normal; font-size: 12px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section-kicker {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.5vw, 68px); font-weight: 700;
  line-height: 1.04; letter-spacing: -0.03em;
}
.section-sub {
  max-width: 540px; margin-top: 22px; color: var(--ink-dim);
  font-size: clamp(15px, 1.5vw, 17px);
}

.products { padding: clamp(90px, 12vw, 160px) clamp(20px, 6vw, 80px); }
.section-head { margin-bottom: clamp(48px, 6vw, 80px); }

/* ---------- Cards ---------- */
.cards {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}
.card {
  position: relative; overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(28px, 3.4vw, 46px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.4s, transform 0.15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}
.card:hover { border-color: rgba(124, 92, 255, 0.45); }
.card-glow {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(124, 92, 255, 0.14), transparent 55%);
  transition: opacity 0.4s;
}
.card:hover .card-glow { opacity: 1; }

.card-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: clamp(34px, 4vw, 56px);
}
.card-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim);
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(75, 225, 230, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(75, 225, 230, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(75, 225, 230, 0); }
  100% { box-shadow: 0 0 0 0 rgba(75, 225, 230, 0); }
}
.card-num {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--ink-faint); letter-spacing: 0.1em;
}
.card-name {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; letter-spacing: -0.02em;
}
.card-name em {
  font-style: normal;
  background: linear-gradient(100deg, var(--violet), var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.card-tag {
  font-family: var(--font-display); font-size: clamp(17px, 1.8vw, 20px);
  font-weight: 500; color: var(--ink); margin-top: 10px;
}
.card-desc { margin-top: 16px; color: var(--ink-dim); font-size: 15.5px; max-width: 46ch; }
.card-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.card-chips span {
  font-family: var(--font-display); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px;
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.25s, border-color 0.25s;
}
.card:hover .card-chips span { color: var(--ink); border-color: rgba(255, 255, 255, 0.18); }
.card-soon {
  margin-top: 30px; font-family: var(--font-display); font-size: 13px;
  color: var(--ink-faint); letter-spacing: 0.04em;
}

/* Redacted card: identical structure and style, content unreadable.
   The shell (border, radius, glass, hover glow, tilt) stays crisp; only text blurs. */
.card-redacted { user-select: none; }
.card-redacted :is(.card-top, .card-name, .card-tag, .card-desc, .card-chips, .card-soon) {
  filter: blur(9px);
  pointer-events: none;
}

/* Clickable card: invisible link stretched over the whole card.
   Card content stays outside the anchor, so link color/underline can never leak in. */
.card-link { cursor: pointer; }
.card-stretch {
  position: absolute; inset: 0; z-index: 2; border-radius: inherit;
}
.card-link:focus-within { border-color: rgba(124, 92, 255, 0.45); }

/* ---------- Studio ---------- */
.studio {
  padding: clamp(70px, 10vw, 140px) clamp(20px, 6vw, 80px);
  border-top: 1px solid var(--line);
  max-width: 1100px;
}
.studio-line {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 42px); font-weight: 500;
  line-height: 1.3; letter-spacing: -0.02em; color: var(--ink);
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 34px clamp(20px, 6vw, 80px); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
}
.footer-note { color: var(--ink-faint); font-size: 13.5px; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.cards .card:nth-child(2).reveal:not(.in) { transition-delay: 0.12s; }
.cards .card:nth-child(3).reveal:not(.in) { transition-delay: 0.24s; }
.card.reveal.in { transition: border-color 0.4s, transform 0.15s ease-out; }

/* Hero elements that reveal on load */
.hero .reveal { animation: fadeup 1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.hero-kicker.reveal { animation-delay: 0.1s; }
.hero-sub.reveal { animation-delay: 0.45s; }
.hero-scroll.reveal { animation-delay: 0.8s; }
@keyframes fadeup {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-title .line > span { transform: none; }
  html { scroll-behavior: auto; }
}
