:root {
  --ink: #10140f;
  --muted: #54624c;
  --paper: #f5f0df;
  --paper-2: #fff9e8;
  --line: rgba(16, 20, 15, 0.16);
  --lime: #d6ff5c;
  --mint: #7de2b8;
  --blue: #75d8ff;
  --orange: #ff8f4c;
  --rose: #ff6f91;
  --card: rgba(255, 249, 232, 0.82);
  --shadow: 0 24px 80px rgba(28, 36, 20, 0.18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 8%, rgba(214, 255, 92, 0.52), transparent 25rem),
    radial-gradient(circle at 92% 2%, rgba(255, 143, 76, 0.36), transparent 24rem),
    linear-gradient(135deg, #f8f1d8 0%, #ecf2d7 48%, #e8f5ef 100%);
  font-family: "Space Grotesk", "Aptos", "Trebuchet MS", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(16, 20, 15, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 20, 15, 0.12) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 88%);
}

a { color: inherit; text-decoration: none; }
code, pre { font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace; }
pre {
  margin: 0;
  padding: 1.05rem;
  overflow: auto;
  border-radius: 22px;
  color: #ecffe0;
  background: #10140f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--lime);
  box-shadow: 5px 5px 0 var(--ink);
}

.brand-mark svg { width: 26px; height: 26px; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  background: rgba(255, 249, 232, 0.58);
  backdrop-filter: blur(10px);
  font-size: 0.92rem;
  font-weight: 750;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.88rem 1.1rem;
  background: var(--ink);
  color: var(--paper-2);
  font-weight: 900;
  box-shadow: 6px 6px 0 rgba(16, 20, 15, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 9px 9px 0 rgba(16, 20, 15, 0.22);
}

.button.secondary { background: var(--paper-2); color: var(--ink); }

.hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 2rem;
  align-items: center;
  padding: 4rem 0 3rem;
}

.eyebrow {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.72rem;
  background: rgba(255, 249, 232, 0.72);
  color: var(--muted);
  font-weight: 850;
  font-size: 0.9rem;
}

h1,
h2,
h3 {
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
  letter-spacing: -0.06em;
  line-height: 0.95;
  margin: 0;
}

h1 { font-size: clamp(3.05rem, 6.4vw, 6.35rem); margin-top: 1rem; }
h2 { font-size: clamp(2.35rem, 5vw, 5rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.45rem, 2.4vw, 2.15rem); margin-bottom: 0.7rem; }

.lead {
  max-width: 690px;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.8vw, 1.36rem);
}

.actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.7rem; }

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.feature-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.48rem 0.72rem;
  background: rgba(255, 249, 232, 0.74);
  color: var(--muted);
  font-weight: 850;
}

.panel {
  border: 2px solid var(--ink);
  border-radius: 34px;
  background: var(--card);
  box-shadow: var(--shadow), 8px 8px 0 rgba(16, 20, 15, 0.14);
  backdrop-filter: blur(14px);
}

.shelf-card {
  position: relative;
  padding: 1.1rem;
  transform: rotate(1.5deg);
  animation: float-in 720ms ease both;
}

.shelf-card-inner {
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 26px;
  background: #1b2017;
  color: var(--paper-2);
}

.shelf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.traffic { display: flex; gap: 0.35rem; }
.traffic span { width: 10px; height: 10px; border-radius: 999px; background: var(--lime); }
.traffic span:nth-child(2) { background: var(--orange); }
.traffic span:nth-child(3) { background: var(--blue); }

.shelves { padding: 1rem; display: grid; gap: 0.75rem; }
.shelf-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.55rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid rgba(245, 240, 223, 0.24);
}

.item {
  min-height: 82px;
  border-radius: 14px 14px 7px 7px;
  background: linear-gradient(150deg, var(--blue), #eaffff);
  border: 2px solid rgba(255, 255, 255, 0.78);
  position: relative;
}
.item:nth-child(2n) { background: linear-gradient(150deg, var(--orange), #ffe8c7); }
.item:nth-child(3n) { background: linear-gradient(150deg, var(--lime), #f8ffd2); }

.box {
  position: absolute;
  border: 2px solid var(--lime);
  border-radius: 10px;
  inset: 0.2rem;
  box-shadow: 0 0 0 999px rgba(16, 20, 15, 0.16);
}

.tag {
  position: absolute;
  left: 0.28rem;
  bottom: 0.28rem;
  max-width: calc(100% - 0.56rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.17rem 0.38rem;
  background: var(--ink);
  color: var(--paper-2);
  font-size: 0.62rem;
  font-weight: 900;
}

.metrics,
.grid,
.flow,
.code-grid,
.docs-layout { display: grid; }

.metrics {
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin: 1.2rem 0 0;
}

.metric {
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 249, 232, 0.7);
}
.metric strong { display: block; font-size: 1.8rem; letter-spacing: -0.05em; }
.metric span { color: var(--muted); font-weight: 750; }

.landing-hero { grid-template-columns: 0.82fr 1.18fr; }

.demo-card {
  overflow: hidden;
  padding: 0;
  transform: rotate(1deg);
  animation: float-in 720ms ease both;
}

.demo-browser {
  overflow: hidden;
  border-radius: 32px 32px 20px 20px;
  background: #171d13;
  color: var(--paper-2);
}

.demo-images {
  display: grid;
  grid-template-columns: 0.78fr 1fr;
  gap: 0.75rem;
  padding: 0.9rem;
}

.demo-shot {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 2px solid rgba(245, 240, 223, 0.24);
  border-radius: 22px;
  background: #0e130c;
}

.demo-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.demo-shot.featured {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(214, 255, 92, 0.13);
}

.demo-shot span {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  border-radius: 999px;
  padding: 0.42rem 0.64rem;
  background: rgba(16, 20, 15, 0.86);
  color: var(--paper-2);
  font-size: 0.86rem;
  font-weight: 900;
}

.demo-card figcaption {
  margin: 0;
  padding: 0.8rem 1rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.split-section {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 1.4rem;
  align-items: start;
}

.sales-grid .card p { margin-bottom: 0; }

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  margin: 2rem 0 1rem;
}

section { padding: 3.2rem 0; }
.grid { gap: 1rem; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 249, 232, 0.72);
  box-shadow: 0 12px 38px rgba(28, 36, 20, 0.08);
}
.card.accent { border: 2px solid var(--ink); background: var(--lime); box-shadow: 7px 7px 0 rgba(16, 20, 15, 0.16); }
.muted { color: var(--muted); }

.flow {
  grid-template-columns: repeat(5, 1fr);
  gap: 0.7rem;
  align-items: stretch;
}

.flow-step {
  position: relative;
  min-height: 132px;
  padding: 1rem;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--paper-2);
}
.flow-step::after {
  content: "";
  position: absolute;
  right: -0.65rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  transform: translateY(-50%) rotate(45deg);
}
.flow-step:last-child::after { display: none; }

.number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-2);
  font-weight: 900;
}

.code-grid { grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; }
.footer { padding: 2rem 0 3rem; color: var(--muted); }

.docs-layout {
  grid-template-columns: 270px 1fr;
  gap: 1.4rem;
  align-items: start;
  padding: 1rem 0 4rem;
}

.toc { position: sticky; top: 1rem; padding: 1rem; }
.toc a { display: block; padding: 0.45rem 0.2rem; color: var(--muted); font-weight: 800; }
.docs-main { display: grid; gap: 1rem; }
.doc-section { padding: 1.35rem; scroll-margin-top: 1rem; }
.endpoint { display: inline-flex; gap: 0.55rem; align-items: center; font-weight: 900; }
.method { border-radius: 999px; padding: 0.16rem 0.48rem; color: var(--paper-2); background: var(--ink); font-size: 0.8rem; }
.table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 18px; }
.table th,
.table td { text-align: left; vertical-align: top; padding: 0.75rem; border-bottom: 1px solid var(--line); }
.table th { background: rgba(16, 20, 15, 0.08); }
.callout { border-left: 6px solid var(--orange); background: rgba(255, 143, 76, 0.13); padding: 1rem; border-radius: 18px; }

@keyframes float-in {
  from { opacity: 0; transform: translateY(20px) rotate(-1deg); }
  to { opacity: 1; transform: translateY(0) rotate(1.5deg); }
}

@media (max-width: 900px) {
  .hero,
  .code-grid,
  .docs-layout,
  .split-section { grid-template-columns: 1fr; }
  .grid.cols-3,
  .grid.cols-2,
  .metrics,
  .flow { grid-template-columns: 1fr; }
  .flow-step::after { display: none; }
  .toc { position: static; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .nav { justify-content: flex-start; }
  .shelf-card,
  .demo-card { transform: none; }
  .demo-images { grid-template-columns: 1fr; }
  .demo-shot { min-height: 220px; }
  .cta-panel { align-items: flex-start; flex-direction: column; }
}

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