/* Bit apps site. Colors follow the Root apps' dark and light themes.
   Each app has its own accent color, set at the bottom under "app accents". */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/manrope.ttf") format("truetype");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/assets/fonts/dm-sans.ttf") format("truetype");
}

:root {
  --bg: #0b0c0f;
  --surface: #121419;
  --surface-2: #171a20;
  --surface-3: #1e2128;
  --hover: #1a1d23;
  --line: #22252c;
  --line-strong: #2e323a;
  --text: #eceef3;
  --text-2: #c4c7ce;
  --muted: #8b909a;
  --faint: #5e636d;
  --glass: rgba(13,14,18,.72);
  --btn-bg: #eceef3;
  --btn-ink: #0b0c0f;
  --btn-hover: #ffffff;
  --accent: #8fa6ff;
  --accent-rgb: 143,166,255;
  --accent-text: #b4c2ff;
  --accent-ink: #0b0c0f;
  --grad: linear-gradient(95deg,#3ccf91 0%,#38bdf8 38%,#8fa6ff 70%,#dfc494 100%);
  --dot: rgba(255,255,255,.07);
  --shadow: 0 1px 0 rgba(255,255,255,.035) inset,0 24px 60px -28px rgba(0,0,0,.7);
  --shadow-lg: 0 50px 100px -40px rgba(0,0,0,.85);
  --icon-ring: rgba(255,255,255,.08);
  --ghost-line: rgba(255,255,255,.16);
  --aurora: .2;
  --radius-tag: 5px;
  --radius-btn: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --sans: "DM Sans",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --display: "Manrope","DM Sans",ui-sans-serif,system-ui,sans-serif;
  --mono: ui-monospace,SFMono-Regular,"Cascadia Mono",Consolas,monospace;
  --wrap: 1200px;
  --gutter: 24px;
  --header: 64px;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --surface-3: #eceef2;
  --hover: #f1f3f6;
  --line: #e2e5ea;
  --line-strong: #cdd2d9;
  --text: #14161a;
  --text-2: #363b44;
  --muted: #5b626d;
  --faint: #7d848f;
  --glass: rgba(246,247,249,.78);
  --btn-bg: #14161a;
  --btn-ink: #ffffff;
  --btn-hover: #000000;
  --accent: #3d5bd9;
  --accent-rgb: 61,91,217;
  --accent-text: #3149b8;
  --accent-ink: #ffffff;
  --grad: linear-gradient(95deg,#0f7a4f 0%,#0a73a8 38%,#3d5bd9 70%,#866525 100%);
  --dot: rgba(20,22,26,.09);
  --shadow: 0 1px 2px rgba(20,22,26,.04),0 20px 44px -26px rgba(30,40,60,.28);
  --shadow-lg: 0 50px 90px -40px rgba(30,40,60,.42);
  --icon-ring: rgba(20,22,26,.08);
  --ghost-line: rgba(20,22,26,.18);
  --aurora: .13;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

p {
  margin: 0;
}

h1, h2, h3 {
  margin: 0;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: rgba(var(--accent-rgb),.3);
}

:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb),.95);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.i {
  width: 18px;
  height: 18px;
  flex: none;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  background: var(--btn-bg);
  color: var(--btn-ink);
  padding: 10px 14px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  text-decoration: none;
  transition: top .15s;
}

.skip:focus {
  top: 12px;
}

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font: 600 14px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s,border-color .15s,box-shadow .2s,transform .15s,filter .15s;
}

.btn .i {
  width: 16px;
  height: 16px;
}

.btn .arrow {
  transition: transform .2s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-lg {
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
  border-radius: 10px;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
}

.btn-primary:hover {
  background: var(--btn-hover);
  box-shadow: 0 10px 30px -12px rgba(var(--accent-rgb),.55);
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -12px rgba(var(--accent-rgb),.7);
}

.btn-accent:hover {
  filter: brightness(1.08) saturate(1.05);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--ghost-line);
}

.btn-ghost:hover {
  background: var(--hover);
  border-color: var(--faint);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background .15s,color .15s,border-color .15s;
}

.icon-btn:hover {
  background: var(--hover);
  color: var(--text);
  border-color: var(--line-strong);
}

.icon-btn:disabled {
  opacity: .4;
  cursor: default;
}

.icon-btn:disabled:hover {
  background: transparent;
  color: var(--text-2);
  border-color: var(--line);
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-tag);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text-2);
  font: 600 12px/1 var(--sans);
  white-space: nowrap;
}

.chip-accent {
  background: rgba(var(--accent-rgb),.12);
  border-color: rgba(var(--accent-rgb),.35);
  color: var(--accent-text);
}

.eyebrow {
  font: 700 12px/1.2 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 14px;
}

.app-icon {
  border-radius: 23%;
  box-shadow: 0 0 0 1px var(--icon-ring),0 10px 26px -12px rgba(var(--accent-rgb),.65);
  background: var(--surface-3);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .25s,border-color .25s;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(170%) blur(18px);
  backdrop-filter: saturate(170%) blur(18px);
  transition: opacity .25s;
}

.site-header.scrolled, .site-header.menu-open {
  border-bottom-color: var(--line);
}

.site-header.scrolled::before, .site-header.menu-open::before {
  opacity: 1;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 20px/1 var(--display);
  letter-spacing: -.03em;
  color: var(--text);
  text-decoration: none;
  flex: none;
}

.brand-pic {
  display: flex;
  flex: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--icon-ring), 0 0 18px -6px rgba(57, 255, 20, .45);
}

.nav {
  flex: 1;
  min-width: 0;
}

.nav ul {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 11px 0 8px;
  border-radius: var(--radius-btn);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s,color .15s,box-shadow .15s;
}

.nav-link img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  box-shadow: 0 0 0 1px var(--icon-ring);
}

.nav-link:hover {
  background: var(--hover);
  color: var(--text);
}

.nav-link[aria-current="page"] {
  color: var(--text);
  background: rgba(var(--accent-rgb),.12);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: none;
}

.theme-toggle .i-moon {
  display: none;
}

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

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

.btn-join .short {
  display: none;
}

.menu-btn {
  display: none;
}

.menu-btn .i-close {
  display: none;
}

.menu-btn[aria-expanded="true"] .i-menu {
  display: none;
}

.menu-btn[aria-expanded="true"] .i-close {
  display: block;
}

.menu {
  position: relative;
  border-top: 1px solid var(--line);
  max-height: calc(100dvh - var(--header));
  overflow-y: auto;
}

.menu .wrap {
  padding-top: 18px;
  padding-bottom: 22px;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.menu-app {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  margin: 0 -10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: background .15s;
}

.menu-app:hover {
  background: var(--hover);
}

.menu-app[aria-current="page"] {
  background: rgba(var(--accent-rgb),.1);
}

.menu-app img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--icon-ring);
}

.menu-app strong {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

.menu-app small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.menu-app .i {
  margin-left: auto;
  color: var(--muted);
}

/* ---------- backgrounds ---------- */
.hero-bg {
  position: absolute;
  inset: calc(var(--header) * -1) 0 -120px;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 55%,transparent);
  mask-image: linear-gradient(#000 55%,transparent);
}

.dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1px,transparent 1.3px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 30%,#000 25%,transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 30%,#000 25%,transparent 75%);
}

.aurora span {
  position: absolute;
  width: min(46vw,640px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--aurora);
  animation: drift 24s ease-in-out infinite alternate;
  will-change: transform;
}

.aurora span:nth-child(1) {
  background: #3ccf91;
  left: 4%;
  top: -14%;
}

.aurora span:nth-child(2) {
  background: #38bdf8;
  right: 6%;
  top: -18%;
  animation-delay: -8s;
}

.aurora span:nth-child(3) {
  background: #7c96ff;
  left: 32%;
  top: 18%;
  animation-delay: -14s;
}

.aurora span:nth-child(4) {
  background: #dfc494;
  right: -6%;
  top: 44%;
  opacity: calc(var(--aurora) * .4);
  animation-delay: -4s;
}

.app-hero .aurora span {
  background: var(--accent);
}

.app-hero .aurora span:nth-child(1) {
  left: -6%;
  top: -20%;
}

.app-hero .aurora span:nth-child(2) {
  right: -4%;
  top: 6%;
  opacity: calc(var(--aurora) * 1.2);
}

.app-hero .aurora span:nth-child(3), .app-hero .aurora span:nth-child(4) {
  display: none;
}

@keyframes drift {
  0% {
    transform: translate3d(0,0,0) scale(1);
  }
  50% {
    transform: translate3d(5%,7%,0) scale(1.08);
  }
  100% {
    transform: translate3d(-5%,2%,0) scale(.94);
  }
}

/* ---------- home hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: 80px 0 96px;
  text-align: center;
}

.hero .aurora span {
  opacity: calc(var(--aurora) * .7);
}

.hero .aurora span:nth-child(3), .hero .aurora span:nth-child(4) {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* "New" pill above the headline */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text-2);
  font-size: 14px;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}

.pill:hover {
  border-color: var(--faint);
  color: var(--text);
}

.pill > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill-tag {
  flex: none;
  padding: 3px 7px;
  border-radius: var(--radius-tag);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 12px;
  font-weight: 700;
}

.pill .i {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

/* Headline drawn as SVG: "Level up" in the app colors with a soft glow and a passing shine.
   One line on wide screens, two lines on phones. */
.headline {
  margin: 32px 0 0;
}

.hl {
  display: block;
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.hl-wide {
  width: min(100%, 740px);
}

.hl-narrow {
  display: none;
  width: min(100%, 470px);
}

.hl-type {
  font: 800 100px var(--display);
  letter-spacing: -4px;
}

.hl-rest {
  fill: var(--text);
}

.hl-s1 {
  stop-color: #3ccf91;
}

.hl-s2 {
  stop-color: #38bdf8;
}

.hl-s3 {
  stop-color: #8fa6ff;
}

:root[data-theme="light"] .hl-s1 {
  stop-color: #0f7a4f;
}

:root[data-theme="light"] .hl-s2 {
  stop-color: #0a73a8;
}

:root[data-theme="light"] .hl-s3 {
  stop-color: #3d5bd9;
}

.hl-glow {
  opacity: .4;
}

:root[data-theme="light"] .hl-glow {
  opacity: .2;
}

.hl-sheen {
  animation: sheen 6s var(--ease) 1s infinite;
}

@keyframes sheen {
  0% {
    transform: translateX(0);
  }
  45%, 100% {
    transform: translateX(560px);
  }
}

.hero .lede {
  max-width: 640px;
  margin: 20px auto 0;
  color: var(--muted);
}

/* App bar under the headline */
.dock {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  margin: 44px auto 0;
  padding: 10px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.dock-item {
  position: relative;
  display: block;
  border-radius: 13px;
  transition: transform .25s var(--ease);
}

.dock-item img {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  box-shadow: 0 0 0 1px var(--icon-ring);
}

.dock-item::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border-radius: 13px;
  background: rgb(var(--accent-rgb));
  filter: blur(16px);
  opacity: 0;
  transition: opacity .25s;
}

.dock-item span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  padding: 5px 8px;
  border-radius: var(--radius-tag);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .15s, transform .15s;
}

.dock-item:hover, .dock-item:focus-visible {
  transform: translateY(-5px) scale(1.06);
}

.dock-item:hover::after, .dock-item:focus-visible::after {
  opacity: .5;
}

.dock-item:hover span, .dock-item:focus-visible span {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 640px) {
  .pill > span:nth-child(2) {
    white-space: normal;
    text-align: left;
  }
  .hl-wide {
    display: none;
  }
  .hl-narrow {
    display: block;
  }
  .dock {
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
  }
  .dock-item img {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hl-sheen {
    display: none;
  }
}

.lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 560px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- sections ---------- */
.section {
  padding: 88px 0 0;
}

.section-last {
  padding-bottom: 96px;
}

h2 {
  font: 800 clamp(24px,2.6vw,32px)/1.15 var(--display);
  letter-spacing: -.03em;
}

.section-title {
  margin-bottom: 28px;
}

/* ---------- cards ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.bento {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 16px;
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.span-6 {
  grid-column: span 6;
}

.app-card {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 0;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .25s,transform .35s var(--ease),box-shadow .35s;
}

.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,-30%),rgba(var(--accent-rgb),.12),transparent 62%);
  opacity: 0;
  transition: opacity .3s;
}

.app-card:hover {
  border-color: rgba(var(--accent-rgb),.4);
  transform: translateY(-3px);
}

.app-card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-id {
  min-width: 0;
}

.card-id h2 {
  font: 700 17px/1.25 var(--display);
  letter-spacing: -.02em;
}

.card-id h2 a {
  text-decoration: none;
}

.card-id p {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 1px;
}

.card-arrow {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color .2s,border-color .2s;
}

.card-arrow .i {
  width: 16px;
  height: 16px;
  transition: transform .2s var(--ease);
}

.app-card:hover .card-arrow {
  color: var(--accent-text);
  border-color: rgba(var(--accent-rgb),.4);
}

.app-card:hover .card-arrow .i {
  transform: translateX(2px);
}

.stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.stretched:focus-visible {
  outline: none;
}

.stretched:focus-visible::after {
  outline: 2px solid rgba(var(--accent-rgb),.95);
  outline-offset: -2px;
  border-radius: var(--radius-lg);
}

.card-slogan {
  font: 700 18px/1.3 var(--display);
  letter-spacing: -.02em;
  margin-top: 20px;
}

.card-tldr {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 6px;
  max-width: 56ch;
}

.card-shot {
  position: relative;
  margin: 24px -56px 0 0;
  height: 200px;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-right: 0;
  border-radius: 10px 0 0 0;
  overflow: hidden;
  background: var(--surface-2);
  transition: transform .45s var(--ease);
}

.card-shot img {
  width: var(--zoom,150%);
  max-width: none;
  height: auto;
}

.span-2 .card-shot {
  --zoom: 190%;
  height: 170px;
}

.span-6 .card-shot {
  --zoom: 110%;
  height: 240px;
}

.app-card:hover .card-shot {
  transform: translateY(-4px);
}

.principles {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 28px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles li {
  display: flex;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.principles .i {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--muted);
}

.principles h3 {
  font: 700 15.5px/1.35 var(--display);
  letter-spacing: -.01em;
}

.principles p {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 4px;
}

/* ---------- app page ---------- */
.app-hero {
  position: relative;
  isolation: isolate;
  padding: 56px 0 24px;
}

.app-hero-grid {
  display: grid;
  grid-template-columns: minmax(0,11fr) minmax(0,13fr);
  gap: 56px;
  align-items: center;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

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

.crumbs [aria-current] {
  color: var(--text-2);
}

.app-id {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
}

.app-id .app-icon {
  width: 52px;
  height: 52px;
}

.app-name {
  font: 700 19px/1.2 var(--display);
  letter-spacing: -.02em;
}

.app-meta {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

.display-2 {
  font: 800 clamp(32px,3.8vw,50px)/1.06 var(--display);
  letter-spacing: -.04em;
}

.accent-text {
  color: var(--accent);
}

.app-hero-copy .lede {
  margin: 18px 0 0;
  max-width: 480px;
}

.app-hero-copy .cta-row {
  justify-content: flex-start;
}

.app-hero-copy .eyebrow {
  margin-bottom: 12px;
}

.app-hero-shot {
  position: relative;
  margin: 0 -40px 0 0;
  perspective: 1800px;
}

.app-hero-shot::before {
  content: "";
  position: absolute;
  inset: 14% 8% -6% 10%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(var(--accent-rgb),.36);
  filter: blur(70px);
}

.window {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-lg),0 0 0 1px rgba(255,255,255,.03) inset;
  transform: rotateY(-8deg) rotateX(3deg);
  transform-origin: left center;
  transition: transform .8s var(--ease);
}

.app-hero-shot:hover .window {
  transform: none;
}

.window-bar {
  display: flex;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.window-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.window img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  background: #0d0e11;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
  margin-top: 48px;
}

.fact {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.fact-value {
  font: 800 clamp(24px,2.4vw,30px)/1 var(--display);
  letter-spacing: -.03em;
  color: var(--accent-text);
}

.fact-label {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 10px;
}

.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.overview-head .section-title {
  margin: 0;
}

.seg {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}

.seg button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s,color .15s,box-shadow .15s;
}

.seg button:hover {
  color: var(--text);
}

.seg button[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,.25),0 0 0 1px var(--line-strong);
}

.js .desc-full {
  display: none;
}

.js[data-desc="full"] .desc-tldr {
  display: none;
}

.js[data-desc="full"] .desc-full {
  display: block;
}

html:not(.js) .seg {
  display: none;
}

html:not(.js) .desc-full {
  margin-top: 56px;
}

.desc {
  animation: fade .35s var(--ease);
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.tldr {
  font: 600 clamp(18px,1.8vw,21px)/1.5 var(--display);
  letter-spacing: -.015em;
  max-width: 56ch;
}

.glance {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.glance li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
}

.glance .i {
  width: 16px;
  height: 16px;
  color: var(--accent-text);
  stroke-width: 2.4;
}

.intro {
  font-size: 16.5px;
  color: var(--text-2);
  max-width: 760px;
  margin-bottom: 24px;
}

.features {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
}

.feature {
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 16px/1.3 var(--display);
  letter-spacing: -.01em;
  margin-bottom: 12px;
}

.feature h3::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}

.feature p {
  color: var(--text-2);
  font-size: 14.5px;
  margin-bottom: 10px;
}

.feature ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature li {
  position: relative;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.55;
}

.feature li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: .74em;
  width: 7px;
  height: 1.6px;
  border-radius: 1px;
  background: var(--faint);
}

.note {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 780px;
  margin-top: 20px;
}

.gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.gallery-head .section-title {
  margin: 0;
}

.gallery-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-count {
  font: 600 13px var(--mono);
  color: var(--muted);
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}

/* Percentages here resolve against the strip's width, so the first slide lines up with the page content
   without counting the scrollbar the way 100vw would. */
.gallery {
  --edge: max(var(--gutter),calc((100% - var(--wrap)) / 2));
}

.gallery-track {
  position: relative;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 4px var(--edge) 8px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-track:focus-visible {
  outline-offset: -2px;
  border-radius: 0;
}

.slide {
  flex: 0 0 min(860px,86vw);
  scroll-snap-align: start;
}

.slide-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  background: #0d0e11;
  cursor: zoom-in;
  box-shadow: var(--shadow);
}

.slide-btn img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  transition: transform .6s var(--ease);
}

.slide-btn:hover img {
  transform: scale(1.02);
}

.slide-cap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 12px 2px 0;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
}

.slide-cap span {
  font: 600 12px var(--mono);
  color: var(--accent-text);
}

.gallery-bar {
  height: 2px;
  margin-top: 24px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.gallery-bar span {
  display: block;
  height: 100%;
  width: calc(var(--p,0) * 100%);
  min-width: 8%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .3s var(--ease);
}

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #eceef3;
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(5,6,8,.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lightbox[open] {
  animation: fade .25s var(--ease);
}

.lb-stage {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 72px 88px 40px;
}

.lb-stage img {
  max-width: min(1600px,100%);
  max-height: calc(100dvh - 170px);
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
  user-select: none;
  -webkit-user-drag: none;
}

.lb-cap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: #c4c7ce;
  font-weight: 500;
  text-align: center;
}

.lb-cap [data-lb-count] {
  font: 600 12px var(--mono);
  color: #8b909a;
  font-variant-numeric: tabular-nums;
}

.lb-btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #eceef3;
  cursor: pointer;
  transition: background .15s;
}

.lb-btn:hover {
  background: rgba(255,255,255,.14);
}

.lb-btn .i {
  width: 20px;
  height: 20px;
}

.lb-close {
  top: 18px;
  right: 18px;
}

.lb-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 760px;
}

.timeline>li {
  position: relative;
  padding: 0 0 34px 34px;
}

.timeline>li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 16px;
  bottom: -4px;
  width: 1px;
  background: var(--line-strong);
}

.timeline>li:last-child {
  padding-bottom: 0;
}

.timeline>li:last-child::before {
  display: none;
}

.timeline>li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
}

.timeline>li:first-child::after {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(var(--accent-rgb),.16);
}

.tl-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tl-head h3 {
  font: 700 16px/1.3 var(--display);
  letter-spacing: -.01em;
}

.timeline ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 14.5px;
}

.timeline ul li::marker {
  color: var(--faint);
}

.disclaimer {
  margin-top: 48px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- privacy ---------- */
.doc-hero {
  position: relative;
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(900px 260px at 0% 0%,rgba(var(--accent-rgb),.1),transparent 70%);
}

.doc-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

.doc-title .app-icon {
  width: 56px;
  height: 56px;
  flex: none;
}

.doc-title h1 {
  font: 800 clamp(26px,3vw,36px)/1.15 var(--display);
  letter-spacing: -.03em;
}

.doc-title p {
  color: var(--muted);
  margin-top: 6px;
}

.doc-grid {
  display: grid;
  grid-template-columns: 230px minmax(0,1fr);
  gap: 64px;
  padding-top: 48px;
  padding-bottom: 96px;
}

.toc {
  position: sticky;
  top: calc(var(--header) + 32px);
  align-self: start;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: color .15s,border-color .15s;
}

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

.toc a.active {
  color: var(--text);
  border-left-color: var(--accent);
}

.prose {
  max-width: 740px;
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.75;
}

.prose>p:first-child {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
}

.prose h2 {
  font: 700 22px/1.3 var(--display);
  letter-spacing: -.022em;
  color: var(--text);
  margin: 52px 0 14px;
}

.prose h3 {
  font: 700 19px/1.3 var(--display);
  color: var(--text);
  margin: 32px 0 10px;
}

.prose p {
  margin: 0 0 16px;
}

.prose ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.prose li {
  margin: 7px 0;
  padding-left: 4px;
}

.prose li::marker {
  color: var(--faint);
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose a:not(.btn) {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-color: rgba(var(--accent-rgb),.45);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose a:not(.btn):hover {
  text-decoration-color: currentColor;
}

.prose code {
  font: .88em var(--mono);
  padding: 2px 6px;
  border-radius: var(--radius-tag);
  background: var(--surface-3);
  color: var(--text);
}

.doc-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 56px;
  padding: 28px 30px;
  background: radial-gradient(600px 200px at 100% 0%,rgba(var(--accent-rgb),.12),transparent 70%),var(--surface);
}

.doc-cta h2 {
  font-size: 20px;
  margin: 0 0 6px;
}

.doc-cta p {
  margin: 0;
  font-size: 15.5px;
}

/* ---------- 404 ---------- */
.hero-small {
  text-align: left;
  padding: 96px 0 120px;
}

.hero-small .lede {
  margin-top: 16px;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
  background: linear-gradient(180deg,var(--bg),var(--surface-2));
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);
  gap: 40px;
}

.footer-brand p {
  color: var(--muted);
  max-width: 360px;
  margin-top: 14px;
  font-size: 14.5px;
}

.footer-title {
  font: 700 12px/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer ul {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.site-footer nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
}

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

.footer-bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  color: var(--muted);
  font-size: 13.5px;
}

.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--line);
}

.footer-bottom strong {
  color: var(--text-2);
  font-weight: 600;
}

/* ---------- motion ---------- */

/* Reveal is an animation, not a transition, so hover transforms on the same cards stay snappy. */
.js .reveal {
  opacity: 0;
}

.js .reveal.in {
  opacity: 1;
  animation: rise .75s var(--ease) var(--d,0s) backwards;
}

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

.bento>:nth-child(3n+2), .principles>:nth-child(3n+2), .facts>:nth-child(2) {
  --d: .08s;
}

.bento>:nth-child(3n), .principles>:nth-child(3n), .facts>:nth-child(3) {
  --d: .16s;
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation: none!important;
    transition-duration: .01ms!important;
    transition-delay: 0s!important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .window {
    transform: none;
  }
}

@media print {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .site-header, .hero-bg, .toc {
    display: none;
  }
}

/* ---------- responsive ---------- */
@media (max-width:1100px) {
  .nav {
    display: none;
  }
  .menu-btn {
    display: inline-grid;
  }
  .bento {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .bento>* {
    grid-column: span 1;
  }
  .bento>:last-child:nth-child(odd) {
    grid-column: span 2;
  }
  .bento>:last-child:nth-child(odd) .card-shot {
    --zoom: 120%;
    height: 240px;
  }
  .span-3 .card-shot, .span-2 .card-shot {
    --zoom: 170%;
    height: 180px;
  }
  .app-hero-grid {
    grid-template-columns: minmax(0,1fr);
    gap: 48px;
  }
  .app-hero-shot {
    margin: 0;
  }
  .window {
    transform: none;
  }
  .glance {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .principles {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .doc-grid {
    grid-template-columns: minmax(0,1fr);
    gap: 32px;
  }
  .toc {
    position: static;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }
  .toc ol {
    columns: 2;
    column-gap: 24px;
    border: 0;
  }
  .toc li {
    break-inside: avoid;
  }
  .toc a {
    padding-left: 0;
    border: 0;
  }
}

@media (min-width:1101px) {
  .menu {
    display: none!important;
  }
}

@media (max-width:720px) {
  :root {
    --gutter: 16px;
  }
  .hero {
    padding: 48px 0 64px;
  }
  .section {
    padding-top: 72px;
  }
  .section-last {
    padding-bottom: 72px;
  }
  .bento {
    grid-template-columns: minmax(0,1fr);
    gap: 16px;
  }
  .bento>:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .app-card {
    padding: 22px 22px 0;
  }
  .card-shot, .bento>:last-child:nth-child(odd) .card-shot, .span-3 .card-shot, .span-2 .card-shot {
    --zoom: 190%;
    height: 180px;
    margin-right: -40px;
  }
  .principles {
    grid-template-columns: minmax(0,1fr);
  }
  .cta-row .btn {
    flex: 1 1 auto;
  }
  .btn-join .long {
    display: none;
  }
  .btn-join .short {
    display: inline;
  }
  .btn-join {
    padding: 0 12px;
  }
  .header-row {
    gap: 12px;
  }
  .app-hero {
    padding-top: 28px;
  }
  .app-id {
    margin: 0 0 22px;
  }
  .facts {
    grid-template-columns: minmax(0,1fr);
    gap: 12px;
    margin-top: 36px;
  }
  .fact {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 20px 22px;
  }
  .fact-value {
    flex: none;
    min-width: 84px;
    font-size: 24px;
  }
  .fact-label {
    margin-top: 0;
  }
  .glance, .features {
    grid-template-columns: minmax(0,1fr);
  }
  .seg {
    width: 100%;
  }
  .seg button {
    flex: 1;
  }
  .gallery-head {
    flex-wrap: wrap;
  }
  .gallery-controls .icon-btn {
    display: none;
  }
  .gallery-track {
    gap: 12px;
  }
  .lb-stage {
    padding: 64px 12px 88px;
  }
  .lb-stage img {
    max-height: calc(100dvh - 200px);
  }
  .lb-prev, .lb-next {
    top: auto;
    bottom: 20px;
    transform: none;
  }
  .lb-prev {
    left: calc(50% - 52px);
  }
  .lb-next {
    right: calc(50% - 52px);
  }
  .toc ol {
    columns: 1;
  }
  .doc-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 22px;
  }
  .footer-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 32px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .hero-small {
    padding: 64px 0 72px;
  }
}

@media (pointer:coarse) {
  .nav-link, .seg button {
    min-height: 40px;
  }
  .toc a {
    padding-top: 9px;
    padding-bottom: 9px;
  }
}

/* ---------- app accents (dark first, then light) ---------- */
.app-shield {
  --accent: #3ccf91;
  --accent-rgb: 60,207,145;
  --accent-text: #73dcb0;
  --accent-ink: #0b0c0f;
}

:root[data-theme="light"] .app-shield {
  --accent: #0f7a4f;
  --accent-rgb: 15,122,79;
  --accent-text: #0f7a4f;
  --accent-ink: #ffffff;
}

.app-warden {
  --accent: #38bdf8;
  --accent-rgb: 56,189,248;
  --accent-text: #70cffa;
  --accent-ink: #0b0c0f;
}

:root[data-theme="light"] .app-warden {
  --accent: #0a73a8;
  --accent-rgb: 10,115,168;
  --accent-text: #0a73a8;
  --accent-ink: #ffffff;
}

.app-edit-trail {
  --accent: #7c96ff;
  --accent-rgb: 124,150,255;
  --accent-text: #a1b3ff;
  --accent-ink: #0b0c0f;
}

:root[data-theme="light"] .app-edit-trail {
  --accent: #3d5bd9;
  --accent-rgb: 61,91,217;
  --accent-text: #3d5bd9;
  --accent-ink: #ffffff;
}

.app-discord-bridge {
  --accent: #44c9a5;
  --accent-rgb: 68,201,165;
  --accent-text: #78d8be;
  --accent-ink: #0b0c0f;
}

:root[data-theme="light"] .app-discord-bridge {
  --accent: #0d7f63;
  --accent-rgb: 13,127,99;
  --accent-text: #0d7f63;
  --accent-ink: #ffffff;
}

.app-playnow {
  --accent: #dfc494;
  --accent-rgb: 223,196,148;
  --accent-text: #e8d5b2;
  --accent-ink: #0b0c0f;
}

:root[data-theme="light"] .app-playnow {
  --accent: #866525;
  --accent-rgb: 134,101,37;
  --accent-text: #866525;
  --accent-ink: #ffffff;
}
