:root {
  --bg: #f7f5f2;
  --ink: #111111;
  --muted: #5c5c5c;
  --line: rgba(17, 17, 17, 0.1);
  --card: #ffffff;
  --accent: #fb6d07;
  --accent-ink: #ffffff;
  --black: #111111;
  --shadow: 0 24px 60px rgba(17, 17, 17, 0.08);
  --radius: 18px;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg);
  line-height: 1.6;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(251, 109, 7, 0.16), transparent 58%),
    radial-gradient(720px 420px at 100% 0%, rgba(17, 17, 17, 0.06), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f7f5f2 48%, #f3efe9 100%);
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(17, 17, 17, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 35% 15%, black 18%, transparent 72%);
}

a { color: var(--accent); }

.top {
  width: min(1080px, calc(100% - 32px));
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 50%;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.brand-text .lr { color: var(--black); }
.brand-text .chat { color: var(--accent); }

nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 10px;
}

nav a[aria-current="page"] { color: var(--ink); }

.nav-cta {
  color: var(--accent-ink) !important;
  background: var(--accent);
  border-radius: 999px;
  padding: 10px 14px !important;
}

main {
  width: min(1080px, calc(100% - 32px));
  margin: 28px auto 48px;
}

.hero,
.docs-hero,
.install,
.grid article,
.docs section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero,
.docs-hero {
  padding: clamp(28px, 5vw, 56px);
  animation: rise 700ms ease both;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
}

.hero-copy { min-width: 0; }

.hero-mark {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-mark img {
  width: min(300px, 100%);
  height: auto;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(251, 109, 7, 0.16);
  animation: float 4.5s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  max-width: 14ch;
  margin-bottom: 18px;
}

.lede {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 14px 20px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn:hover { transform: translateY(-1px); }

.btn.primary {
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(251, 109, 7, 0.28);
}

.btn.ghost {
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(17, 17, 17, 0.18);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.live-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.stat {
  min-width: 132px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 2px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(251, 109, 7, 0.55);
  animation: pulse 2.2s ease infinite;
}

.screens {
  margin-top: 10px;
  padding: clamp(22px, 3.5vw, 34px);
  animation: rise 850ms ease both;
}

.screens-head {
  max-width: 52ch;
  margin-bottom: 22px;
}

.screens-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  margin: 0 0 10px;
}

.screens-head .lede {
  margin: 0;
  font-size: 1.05rem;
}

.screens-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(196px, 220px);
  gap: 18px;
  overflow-x: auto;
  padding: 8px 4px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.screens-rail::-webkit-scrollbar {
  height: 8px;
}

.screens-rail::-webkit-scrollbar-thumb {
  background: rgba(17, 17, 17, 0.18);
  border-radius: 999px;
}

.phone {
  margin: 0;
  scroll-snap-align: start;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.phone img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 28px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  box-shadow:
    0 18px 40px rgba(17, 17, 17, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.65) inset;
  background: #111;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.phone:hover img {
  transform: translateY(-6px);
  box-shadow: 0 28px 50px rgba(17, 17, 17, 0.16);
}

.phone-featured img {
  outline: 2px solid rgba(251, 109, 7, 0.55);
  outline-offset: 3px;
}

.phone figcaption {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}

.grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.grid article {
  padding: 22px;
  animation: rise 800ms ease both;
}

.grid article:nth-child(2) { animation-delay: 80ms; }
.grid article:nth-child(3) { animation-delay: 160ms; }
.grid article:nth-child(4) { animation-delay: 220ms; }
.grid article:nth-child(5) { animation-delay: 280ms; }
.grid article:nth-child(6) { animation-delay: 340ms; }
.grid article:nth-child(7) { animation-delay: 400ms; }
.grid article:nth-child(8) { animation-delay: 460ms; }
.grid article:nth-child(9) { animation-delay: 520ms; }
.grid article:nth-child(10) { animation-delay: 580ms; }

.grid h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.grid p,
.install p,
.support p,
.changelog p,
.changelog li,
.docs p,
.docs li {
  color: var(--muted);
}

.changelog,
.support {
  margin-top: 18px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise 900ms ease both;
}

.changelog-head {
  max-width: 54ch;
  margin-bottom: 22px;
}

.changelog-head h2,
.support h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 10px;
}

.release {
  border-top: 1px solid var(--line);
  padding: 18px 0 6px;
}

.release:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.release header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.release h3 {
  font-size: 1.25rem;
  margin: 0;
}

.release time {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.release-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(251, 109, 7, 0.12);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.release.current {
  background: rgba(251, 109, 7, 0.05);
  border: 1px solid rgba(251, 109, 7, 0.18);
  border-radius: 16px;
  padding: 18px 18px 10px;
  margin-bottom: 8px;
}

.release.current + .release {
  border-top: 0;
  padding-top: 18px;
}

.release ul {
  margin: 0;
  padding-left: 1.15rem;
}

.release li {
  margin: 0 0 8px;
}

.release code {
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(17, 17, 17, 0.06);
}

.support .lede {
  max-width: 48ch;
}

.install {
  margin-top: 18px;
  padding: clamp(24px, 4vw, 40px);
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  animation: rise 900ms ease both;
}

.install h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 16px;
}

.install ol {
  margin: 0 0 22px;
  padding-left: 1.2rem;
  color: var(--muted);
}

.install aside {
  background: rgba(251, 109, 7, 0.08);
  border: 1px solid rgba(251, 109, 7, 0.22);
  color: var(--ink);
  border-radius: 18px;
  padding: 22px;
}

.install aside h3 {
  color: var(--accent);
  margin-bottom: 10px;
}

.install aside p {
  color: var(--muted);
  margin: 0 0 12px;
}

.docs {
  display: grid;
  gap: 14px;
}

.docs-hero {
  grid-template-columns: 1fr;
}

.docs section {
  padding: 24px;
}

.docs h2 {
  font-size: 1.55rem;
  margin-bottom: 12px;
}

.docs ul, .docs ol {
  margin: 0;
  padding-left: 1.2rem;
}

.docs details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.docs details:first-of-type { border-top: 0; padding-top: 0; }

.docs summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

footer {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 109, 7, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(251, 109, 7, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 109, 7, 0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 860px) {
  .grid,
  .install,
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-mark { order: -1; }
  h1 { max-width: none; }

  .screens-rail {
    grid-auto-columns: minmax(168px, 190px);
  }
}

@media (max-width: 640px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
  }

  .screens-rail {
    grid-auto-columns: minmax(152px, 72vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
