/* Bouncer landing page. Colors follow the Graphite & Signal tokens (packages/ui/src/tokens.ts).
   Default is Obsidian (pitch black); light is used by prefers-color-scheme and the toggle. */

:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #07080a;
  --surface: #0b0c0f;
  --raised: #111317;
  --hover: #16181d;
  --line: #22262e;
  --line-soft: #15181d;
  --text: #e4e6eb;
  --text-2: #9ea4b1;
  --text-3: #7a8191;
  --accent: #94acff;
  --accent-ink: #000000;
  --accent-soft: rgba(148, 172, 255, 0.14);
  --ok: #5fd39a;
  --warn: #f2b45b;
  --shadow: 0 0 0 1px #22262e, 0 16px 40px rgba(0, 0, 0, 0.7);
  --r-sm: 5px;
  --r-control: 7px;
  --r-md: 10px;
  --r-card: 12px;
  --r-lg: 14px;
  --r-pill: 999px;
  --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Light tokens: system preference unless the visitor picked a theme. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --bg: #e9ebef;
    --panel: #f6f7f9;
    --surface: #ffffff;
    --raised: #ffffff;
    --hover: #edeff3;
    --line: #dadde3;
    --line-soft: #e6e8ec;
    --text: #14161b;
    --text-2: #4b5260;
    --text-3: #5f6674;
    --accent: #3651e0;
    --accent-ink: #ffffff;
    --accent-soft: rgba(54, 81, 224, 0.1);
    --ok: #1f7a50;
    --warn: #9a5b00;
    --shadow: 0 12px 32px rgba(20, 22, 27, 0.1);
  }
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #e9ebef;
  --panel: #f6f7f9;
  --surface: #ffffff;
  --raised: #ffffff;
  --hover: #edeff3;
  --line: #dadde3;
  --line-soft: #e6e8ec;
  --text: #14161b;
  --text-2: #4b5260;
  --text-3: #5f6674;
  --accent: #3651e0;
  --accent-ink: #ffffff;
  --accent-soft: rgba(54, 81, 224, 0.1);
  --ok: #1f7a50;
  --warn: #9a5b00;
  --shadow: 0 12px 32px rgba(20, 22, 27, 0.1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
  min-width: 0;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.25rem, 6.2vw, 3.75rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.25rem);
}

h3 {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

code,
kbd,
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

kbd {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0 0.35em;
  background: var(--raised);
  color: var(--text-2);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: var(--r-control);
  z-index: 10;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

section {
  padding: 72px 0;
  border-top: 1px solid var(--line-soft);
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.section-head p {
  color: var(--text-2);
  margin-top: 12px;
  font-size: 1.0625rem;
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 12px;
}

/* Buttons and small controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--r-control);
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 160ms var(--ease),
    border-color 160ms var(--ease);
}

.btn:hover {
  background: var(--hover);
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--accent);
  filter: brightness(1.08);
}

.btn-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
}

.btn-quiet:hover {
  color: var(--text);
  background: var(--hover);
}

.btn-icon {
  width: 44px;
  padding: 0;
}

.copy {
  flex: none;
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.8125rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img {
  width: 28px;
  height: 28px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  order: 3;
  width: 100%;
}

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 4px 2px;
}

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

.header-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.header-tools .gh {
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  text-decoration: none;
}

.header-tools .gh:hover {
  color: var(--text);
}

@media (min-width: 720px) {
  .site-nav {
    order: 0;
    width: auto;
    margin-left: 24px;
  }
  .header-tools {
    margin-left: 0;
  }
}

/* Hero */

.hero {
  padding: 56px 0 40px;
  border-top: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  justify-items: center;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
}

.badge.is-live .dot {
  background: var(--ok);
}

.hero h1 {
  max-width: 14ch;
  margin: 20px auto 0;
}

.hero .lede {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--text-2);
  font-size: 1.125rem;
}

.hero-orb {
  display: block;
  width: 132px;
  height: auto;
  margin: 0 auto 22px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions .btn-primary {
  min-width: min(100%, 300px);
  font-size: 1.0625rem;
  min-height: 48px;
}

.hero-actions .small {
  color: var(--text-3);
  font-size: 0.875rem;
}

.hero-shot {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.hero-shot img {
  width: 100%;
  height: auto;
}

/* Download */

.download-note {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 0.9375rem;
}

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

.install-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 880px) {
  .install-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.install-grid h3 {
  margin-bottom: 4px;
}

.install-grid .hint {
  color: var(--text-3);
  font-size: 0.875rem;
  margin-bottom: 14px;
}

.cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-control);
  padding: 8px 8px 8px 14px;
}

.cmd code {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.platforms {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 8px;
}

.platforms li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-control);
  background: var(--panel);
}

.platforms .name {
  color: var(--text);
  font-weight: 500;
}

.platforms .file {
  display: block;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  word-break: break-all;
}

.platforms .state {
  color: var(--text-3);
  font-size: 0.875rem;
  white-space: nowrap;
}

.platforms a {
  white-space: nowrap;
  font-weight: 500;
}

/* Features */

.feature {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: 48px 0;
}

.feature + .feature {
  border-top: 1px solid var(--line-soft);
}

.feature p {
  color: var(--text-2);
  margin-top: 14px;
}

.feature ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--text-2);
}

.feature li {
  padding-left: 22px;
  position: relative;
}

.feature li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shot img {
  width: 100%;
  height: auto;
}

.shot figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-3);
  font-size: 0.8125rem;
}

.kicker {
  color: var(--text-3);
  font-size: 0.875rem;
  font-family: var(--font-mono);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8125rem;
}

@media (min-width: 880px) {
  .feature {
    grid-template-columns: 1fr 1.25fr;
    gap: 56px;
  }
  .feature.is-flip {
    grid-template-columns: 1.25fr 1fr;
  }
  .feature.is-flip .copy-col {
    order: 2;
  }
}

/* Rebound */

.rebound {
  background: var(--panel);
}

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

@media (min-width: 880px) {
  .bots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.bot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 10px 18px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.bot svg {
  width: min(120px, 60%);
  height: auto;
  overflow: visible;
}

.bot .bot-name {
  font-weight: 600;
  font-size: 1.0625rem;
}

.bot .bot-role {
  color: var(--text-3);
  font-size: 0.8125rem;
}

.blob-body {
  animation: bob 4.2s ease-in-out infinite;
  transform-origin: 50% 90%;
}

.blob-eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 5.5s infinite;
}

.bot:nth-child(2) .blob-body {
  animation-delay: -1.1s;
}

.bot:nth-child(3) .blob-body {
  animation-delay: -2.2s;
}

.bot:nth-child(4) .blob-body {
  animation-delay: -3.1s;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.02, 0.985);
  }
}

@keyframes blink {
  0%,
  46%,
  50%,
  100% {
    transform: scaleY(1);
  }
  48% {
    transform: scaleY(0.1);
  }
}

.speech {
  max-width: 560px;
  margin: 20px auto 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  font-size: 0.9375rem;
  color: var(--text-2);
}

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

.speech svg {
  width: 36px;
  height: 36px;
  flex: none;
}

.make-grid {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

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

.make-grid .step-n {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-control);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  margin-bottom: 12px;
}

.make-grid p {
  color: var(--text-2);
  font-size: 0.9375rem;
  margin-top: 6px;
}

.rebound-shot {
  margin-top: 40px;
}

/* Private strip */

.private-grid {
  display: grid;
  gap: 16px;
}

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

.private-grid .card p {
  color: var(--text-2);
  margin-top: 8px;
  font-size: 0.9375rem;
}

.private-grid .card .mark {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

/* FAQ */

.faq {
  max-width: 760px;
  display: grid;
  gap: 10px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 0 18px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  font-weight: 500;
  color: var(--text);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-family: var(--font-mono);
  color: var(--text-3);
  font-size: 1.25rem;
  line-height: 1;
  flex: none;
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq details > div {
  padding: 0 0 18px;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.faq details > div p + p {
  margin-top: 10px;
}

.faq a {
  word-break: break-word;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 32px 0 40px;
  color: var(--text-3);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

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

/* 404 */

.notfound {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px 0;
}

.notfound p {
  color: var(--text-2);
  margin: 14px auto 28px;
  max-width: 420px;
}

.notfound .blob-lost {
  width: 120px;
  height: auto;
  margin: 0 auto 8px;
}

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

/* Reduced motion: no bobbing, blinking or smooth scrolling */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
