/* ============================================================
   PowerApps — design system
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg:            #06070b;
  --bg-elev:       #0a0c12;
  --surface:       rgba(255, 255, 255, .035);
  --surface-2:     rgba(255, 255, 255, .06);
  --border:        rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);

  --text:   #eef1f8;
  --muted:  #9aa3b8;
  --faint:  #6b7488;

  --brand:   #4f7cff;
  --brand-2: #22d3ee;
  --accent:  #a855f7;
  --ok:      #34d399;

  --grad: linear-gradient(115deg, var(--brand) 0%, var(--brand-2) 55%, var(--accent) 100%);

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow:    0 18px 40px -18px rgba(0, 0, 0, .75);
  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, .8);

  --maxw: 1160px;
  --nav-h: 68px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg:            #f7f8fc;
  --bg-elev:       #ffffff;
  --surface:       rgba(15, 23, 42, .028);
  --surface-2:     rgba(15, 23, 42, .05);
  --border:        rgba(15, 23, 42, .10);
  --border-strong: rgba(15, 23, 42, .18);

  --text:  #0d1220;
  --muted: #4d5878;
  --faint: #7a849c;

  --brand:   #2f5fe0;
  --brand-2: #0ea5b7;
  --accent:  #8b3fe0;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .07);
  --shadow:    0 18px 40px -22px rgba(15, 23, 42, .35);
  --shadow-lg: 0 40px 90px -34px rgba(15, 23, 42, .35);

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background .4s var(--ease), color .4s var(--ease);
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { padding: 0; list-style: none; }

::selection { background: color-mix(in srgb, var(--brand) 45%, transparent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Ambient background ---------- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-fx__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  will-change: transform;
}

.bg-fx__blob--1 {
  width: 46vw; height: 46vw; min-width: 380px; min-height: 380px;
  top: -14vw; left: -10vw;
  background: radial-gradient(circle at 30% 30%, var(--brand), transparent 68%);
  animation: drift1 26s var(--ease-io) infinite alternate;
}
.bg-fx__blob--2 {
  width: 40vw; height: 40vw; min-width: 320px; min-height: 320px;
  top: 22vh; right: -12vw;
  background: radial-gradient(circle at 60% 40%, var(--brand-2), transparent 68%);
  animation: drift2 32s var(--ease-io) infinite alternate;
  opacity: .38;
}
.bg-fx__blob--3 {
  width: 38vw; height: 38vw; min-width: 300px; min-height: 300px;
  bottom: -12vw; left: 24vw;
  background: radial-gradient(circle at 40% 60%, var(--accent), transparent 68%);
  animation: drift3 29s var(--ease-io) infinite alternate;
  opacity: .34;
}

:root[data-theme="light"] .bg-fx__blob { opacity: .28; filter: blur(80px); }
:root[data-theme="light"] .bg-fx__blob--2 { opacity: .22; }
:root[data-theme="light"] .bg-fx__blob--3 { opacity: .18; }

@keyframes drift1 { to { transform: translate3d(9vw, 7vh, 0) scale(1.14); } }
@keyframes drift2 { to { transform: translate3d(-11vw, 10vh, 0) scale(.9); } }
@keyframes drift3 { to { transform: translate3d(7vw, -9vh, 0) scale(1.1); } }

.bg-fx__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 10%, transparent 78%);
  opacity: .55;
}

.bg-fx__noise {
  position: absolute;
  inset: 0;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.section { padding-block: clamp(64px, 10vw, 128px); position: relative; }
.section--tight { padding-block: clamp(48px, 7vw, 84px); }

.section-head { max-width: 660px; margin-bottom: 48px; }
.section-head--center { margin-inline: auto; text-align: center; }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  line-height: 1.12;
  letter-spacing: -.03em;
  font-weight: 700;
  text-wrap: balance;
}

.h-display { font-size: clamp(2.5rem, 7vw, 4.6rem); letter-spacing: -.045em; }
.h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
.h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -.02em; }

.lead {
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  color: var(--muted);
  max-width: 62ch;
  text-wrap: pretty;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: .6;
}
.section-head--center .eyebrow::before { display: none; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: .82rem;
  color: var(--muted);
  font-weight: 500;
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 70%, transparent);
  animation: pulse 2.4s infinite;
  flex: none;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.tag {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}
.tag--live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.tag--soon { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface-2);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--btn-bg);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -.01em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .35s var(--ease), border-color .3s var(--ease),
              box-shadow .35s var(--ease), background .3s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.btn:active { transform: translateY(0) scale(.985); }
.btn svg { flex: none; }

.btn--primary {
  border-color: transparent;
  background: var(--grad);
  background-size: 180% auto;
  color: #fff;
  box-shadow: 0 12px 34px -12px color-mix(in srgb, var(--brand) 70%, transparent);
}
.btn--primary:hover {
  background-position: 100% center;
  box-shadow: 0 20px 46px -14px color-mix(in srgb, var(--brand) 78%, transparent);
}

.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--surface-2); }

.btn--lg { padding: 16px 30px; font-size: 1rem; }
.btn--sm { padding: 9px 17px; font-size: .86rem; }

.btn--store {
  padding: 11px 22px 11px 18px;
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
  text-align: left;
}
.btn--store small {
  display: block;
  font-size: .62rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  opacity: .68;
  line-height: 1.3;
  font-weight: 600;
}
.btn--store b { font-size: 1.02rem; font-weight: 700; line-height: 1.2; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--brand-2);
}
.link-arrow svg { transition: transform .35s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background .35s var(--ease), border-color .35s var(--ease),
              backdrop-filter .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--border);
}
.nav__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: -.025em;
  font-size: 1.06rem;
  margin-right: auto;
}
.brand__mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--brand) 80%, transparent);
  transition: transform .5s var(--ease);
}
.brand:hover .brand__mark { transform: rotate(-10deg) scale(1.08); }
.brand__mark svg { width: 17px; height: 17px; }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .25s, background .25s;
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }

.nav__actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: background .25s, border-color .25s, transform .3s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }

.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun  { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }

.nav__burger { display: none; }

/* mobile menu */
.mmenu {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  z-index: 99;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 22px 26px;
  display: grid;
  gap: 4px;
  transform: translateY(-14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.mmenu.is-open { opacity: 1; transform: none; visibility: visible; }
.mmenu a {
  padding: 13px 4px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  color: var(--muted);
}
.mmenu a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(48px, 9vw, 104px));
  padding-bottom: clamp(56px, 8vw, 96px);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero__copy { max-width: 620px; }
.hero h1 { margin-block: 18px 22px; }
.hero .lead { margin-bottom: 34px; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 30px;
  font-size: .84rem;
  color: var(--faint);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero__meta svg { width: 15px; height: 15px; color: var(--ok); flex: none; }

/* ---------- Phone mockup ---------- */
.phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1400px;
}
.phone-stage::after {
  content: "";
  position: absolute;
  width: 76%; height: 60%;
  background: var(--grad);
  filter: blur(80px);
  opacity: .3;
  border-radius: 50%;
  z-index: 0;
}

.phone {
  position: relative;
  z-index: 1;
  width: min(290px, 74vw);
  aspect-ratio: 9 / 19.2;
  border-radius: 46px;
  padding: 11px;
  background: linear-gradient(160deg, #33384a, #0d0f16 40%, #24283a);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .07) inset;
  transform: rotateY(-13deg) rotateX(5deg) rotate(1.5deg);
  transform-style: preserve-3d;
  animation: float 7s ease-in-out infinite;
  transition: transform .9s var(--ease);
}
.phone:hover { transform: rotateY(-4deg) rotateX(2deg); }

@keyframes float {
  50% { translate: 0 -16px; }
}

.phone__screen {
  position: relative;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #12305e, #05070f 62%);
  display: grid;
  place-items: center;
}
.phone__notch {
  position: absolute;
  top: 12px; left: 50%;
  translate: -50% 0;
  width: 84px; height: 24px;
  background: #05060a;
  border-radius: 999px;
  z-index: 3;
}

.screen-ui {
  position: relative;
  text-align: center;
  z-index: 2;
  display: grid;
  gap: 20px;
  justify-items: center;
  padding: 20px;
}
.screen-ui__label {
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #7fc7ff;
  font-weight: 600;
}
.screen-ui__title { font-size: 1.22rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.screen-ui__hint { font-size: .72rem; color: #8fa2c4; max-width: 20ch; line-height: 1.5; }

.eject-btn {
  position: relative;
  width: 118px; height: 118px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #38bdf8, #2563eb 60%, #6d28d9);
  box-shadow: 0 18px 40px -12px rgba(37, 99, 235, .8);
  color: #fff;
}
.eject-btn svg { width: 40px; height: 40px; }
.eject-btn::before,
.eject-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(125, 211, 252, .5);
  animation: ripple 2.6s var(--ease-io) infinite;
}
.eject-btn::after { animation-delay: 1.3s; }
@keyframes ripple {
  from { transform: scale(1);   opacity: .8; }
  to   { transform: scale(1.85); opacity: 0; }
}

.wave {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 30px;
}
.wave i {
  width: 4px;
  border-radius: 99px;
  background: linear-gradient(#7dd3fc, #3b82f6);
  animation: bars 1.15s ease-in-out infinite;
}
.wave i:nth-child(1) { height: 34%; animation-delay: -.9s; }
.wave i:nth-child(2) { height: 62%; animation-delay: -.75s; }
.wave i:nth-child(3) { height: 96%; animation-delay: -.6s; }
.wave i:nth-child(4) { height: 70%; animation-delay: -.45s; }
.wave i:nth-child(5) { height: 44%; animation-delay: -.3s; }
.wave i:nth-child(6) { height: 78%; animation-delay: -.15s; }
.wave i:nth-child(7) { height: 40%; }
@keyframes bars { 50% { transform: scaleY(.35); } }

.phone-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-elev) 82%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}
.phone-chip svg { width: 15px; height: 15px; color: var(--brand-2); flex: none; }
.phone-chip--a { top: 16%; left: -4%; animation: float 6s ease-in-out infinite .4s; }
.phone-chip--b { bottom: 19%; right: -6%; animation: float 6.6s ease-in-out infinite 1.1s; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--border);
}
.stat {
  background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 28px 24px;
  text-align: center;
  transition: background .3s;
}
.stat:hover { background: color-mix(in srgb, var(--bg-elev) 92%, transparent); }
.stat__num {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .04em;
  margin-top: 4px;
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-elev) 62%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 28px;
  overflow: hidden;
  transition: transform .45s var(--ease), border-color .35s, box-shadow .45s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%),
              color-mix(in srgb, var(--brand) 15%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }

/* app grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.app-card { display: flex; flex-direction: column; gap: 18px; }
.app-card__top { display: flex; align-items: flex-start; gap: 16px; }

.app-icon {
  width: 62px; height: 62px;
  border-radius: 15px;
  flex: none;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm), 0 10px 26px -12px rgba(0, 0, 0, .8);
  transition: transform .5s var(--ease);
  overflow: hidden;
}
.app-card:hover .app-icon { transform: scale(1.07) rotate(-4deg); }
.app-icon--lg { width: 96px; height: 96px; border-radius: 22px; }
.app-icon svg { width: 58%; height: 58%; }

.app-icon--aqua { background: linear-gradient(155deg, #38bdf8, #2563eb 55%, #4c1d95); color: #fff; }
.app-icon--soon  { background: linear-gradient(155deg, #64748b, #1e293b); color: #cbd5e1; }
.app-icon--brand { background: var(--grad); color: #fff; }

.app-card__name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-card__desc { color: var(--muted); font-size: .93rem; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-size: .73rem;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

.app-card__foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-card--soon { opacity: .72; }
.app-card--soon:hover { opacity: 1; }

/* bento features */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.bento > * { grid-column: span 2; }
.bento > .span-3 { grid-column: span 3; }

.feat__icon {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--brand-2);
  margin-bottom: 18px;
  transition: transform .45s var(--ease), color .3s;
}
.card:hover .feat__icon { transform: translateY(-3px) scale(1.06); color: var(--accent); }
.feat__icon svg { width: 20px; height: 20px; }
.feat p { color: var(--muted); font-size: .93rem; margin-top: 9px; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding-block: 18px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: scroll-x 34s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: .02em;
  white-space: nowrap;
}
.marquee__track span::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand-2);
  opacity: .7;
}
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; }
.step__n {
  counter-increment: s;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  color: var(--brand-2);
  letter-spacing: .1em;
  margin-bottom: 12px;
  display: block;
}
.step__n::before { content: "0" counter(s); }
.step p { color: var(--muted); font-size: .93rem; margin-top: 8px; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 56px);
  overflow: hidden;
  background: color-mix(in srgb, var(--bg-elev) 66%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.cta::before {
  content: "";
  position: absolute;
  inset: -50% 20%;
  background: var(--grad);
  filter: blur(110px);
  opacity: .22;
  pointer-events: none;
}
.cta > * { position: relative; }
.cta .lead { margin-inline: auto; margin-top: 14px; }
.cta .btn-row { justify-content: center; margin-top: 30px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 56px 34px;
  margin-top: 40px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px 28px;
}
.footer__about p { color: var(--muted); font-size: .9rem; margin-top: 14px; max-width: 34ch; }
.footer h4 {
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer__col a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  font-size: .9rem;
  transition: color .25s, transform .3s var(--ease);
}
.footer__col a:hover { color: var(--text); transform: translateX(3px); }

.footer__bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  font-size: .84rem;
  color: var(--faint);
}

/* ---------- App detail page ---------- */
.crumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .84rem;
  color: var(--faint);
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.crumbs a { color: var(--muted); transition: color .25s; }
.crumbs a:hover { color: var(--brand-2); }
.crumbs svg { width: 13px; height: 13px; opacity: .5; }

.app-hero {
  padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 76px));
  padding-bottom: clamp(40px, 6vw, 68px);
}
.app-hero__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.app-hero__head { display: flex; gap: 22px; align-items: center; margin-bottom: 22px; }
.app-hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.app-hero__sub { color: var(--brand-2); font-weight: 600; font-size: .95rem; margin-top: 6px; }

.legal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.legal-card { display: flex; flex-direction: column; gap: 12px; }
.legal-card p { color: var(--muted); font-size: .92rem; }
.legal-card .link-arrow { margin-top: auto; padding-top: 8px; }

/* ---------- Legal document pages ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--grad);
  z-index: 200;
  transition: width .1s linear;
}

.doc {
  padding-top: calc(var(--nav-h) + 56px);
  padding-bottom: 80px;
}
.doc__layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
  border-left: 1px solid var(--border);
  padding-left: 18px;
}
.toc h4 {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
  font-weight: 600;
}
.toc a {
  display: block;
  padding: 6px 0;
  font-size: .86rem;
  color: var(--muted);
  border-left: 2px solid transparent;
  margin-left: -19px;
  padding-left: 17px;
  transition: color .25s, border-color .25s;
}
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--brand-2); border-left-color: var(--brand-2); }

.doc__head { margin-bottom: 44px; }
.doc__head h1 { margin-block: 14px 16px; }
.doc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: .84rem;
  color: var(--faint);
}

.prose { max-width: 74ch; }
.prose section { margin-bottom: 42px; scroll-margin-top: calc(var(--nav-h) + 28px); }
.prose h2 {
  font-size: 1.32rem;
  letter-spacing: -.02em;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 11px;
}
.prose h2 .num {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--brand-2);
  font-weight: 700;
  flex: none;
}
.prose h3 { font-size: 1.02rem; margin: 22px 0 8px; }
.prose p { color: var(--muted); margin-bottom: 14px; }
.prose ul { display: grid; gap: 9px; margin: 6px 0 16px; }
.prose li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: .95rem;
}
.prose li::before {
  content: "";
  position: absolute;
  left: 4px; top: .62em;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--brand-2);
  opacity: .8;
}
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--brand-2); border-bottom: 1px solid color-mix(in srgb, var(--brand-2) 40%, transparent); }
.prose a:hover { border-bottom-color: var(--brand-2); }
.prose code {
  font-family: var(--mono);
  font-size: .88em;
  padding: .12em .42em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  white-space: nowrap;
}

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-2);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
  margin: 18px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: #f59e0b; }

.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.kv__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--surface);
}
.kv__item b { display: block; font-size: .82rem; margin-bottom: 4px; }
.kv__item span { font-size: .86rem; color: var(--muted); }

.doc__foot {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
}

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.nf {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 100px 22px;
}
.nf__code {
  font-size: clamp(5rem, 22vw, 12rem);
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: 1;
  background: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; text-align: left; }
  .phone-stage { margin-top: 20px; }
  .phone { transform: none; width: min(250px, 62vw); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(4, 1fr); }
  .bento > .span-3 { grid-column: span 4; }
  .app-hero__grid { grid-template-columns: 1fr; }
  .doc__layout { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 18px; }
  .toc a { margin-left: 0; padding-left: 0; border-left: 0; border-bottom: 2px solid transparent; display: inline-block; margin-right: 16px; }
  .toc a.is-active { border-left-color: transparent; border-bottom-color: var(--brand-2); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
  .nav__actions .btn { display: none; }
  .bento { grid-template-columns: 1fr; }
  .bento > *, .bento > .span-3 { grid-column: span 1; }
  .app-hero__head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .phone-chip--a { left: -2%; }
  .phone-chip--b { right: -2%; }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; }
}

/* ---------- Motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .nav, .bg-fx, .footer, .toc, .progress, .mmenu { display: none !important; }
  body { background: #fff; color: #000; }
  .doc { padding-top: 0; }
  .doc__layout { grid-template-columns: 1fr; }
  .prose p, .prose li { color: #222; }
}
