:root {
  --paper: #f5f0e7;
  --surface: #fffdf8;
  --ink: #111318;
  --muted: #5d6573;
  --line: #d8d0c3;
  --blue: #244a9b;
  --green: #146b58;
  --red: #b7472f;
  --gold: #aa7200;
  --slate: #2e3748;
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand,
.nav-links,
.button-row,
.status-band,
.terminal-top,
.motion-track,
.cta-band,
.endpoint-callout,
.endpoint-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.nav-links {
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  position: absolute;
  left: 0;
  bottom: 3px;
  width: 100%;
  height: 2px;
  content: "";
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, 82svh);
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(245, 240, 231, 0.96) 0%, rgba(245, 240, 231, 0.82) 42%, rgba(245, 240, 231, 0.34) 100%),
    linear-gradient(180deg, rgba(245, 240, 231, 0.05), rgba(245, 240, 231, 0.78));
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #d9d2c7;
}

.hero-before,
.hero-after-wrap {
  position: absolute;
  inset: 0;
}

.hero-before {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: slow-pan 15s ease-in-out infinite alternate;
}

.hero-after-wrap {
  display: grid;
  place-items: center end;
  padding: clamp(24px, 7vw, 92px);
  background-color: rgba(255, 255, 255, 0.24);
  background-image:
    linear-gradient(45deg, rgba(17, 19, 24, 0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(17, 19, 24, 0.12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(17, 19, 24, 0.12) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(17, 19, 24, 0.12) 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  clip-path: inset(0 0 0 48%);
  animation: reveal-cut 7s ease-in-out infinite alternate;
}

.hero-after {
  width: min(47vw, 520px);
  max-height: 66svh;
  object-fit: contain;
  transform-origin: bottom center;
  animation: float-product 6s ease-in-out infinite;
}

.scan-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 48%;
  width: 2px;
  background: var(--ink);
  animation: scan 7s ease-in-out infinite alternate;
}

.hero-content {
  width: min(760px, calc(100% - 36px));
  align-self: center;
  padding: clamp(62px, 9vw, 120px) 0 clamp(62px, 10vw, 110px);
  margin-left: clamp(18px, 6vw, 76px);
}

.eyebrow,
.meta-label {
  margin: 0;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: clamp(3.1rem, 10vw, 8rem);
  line-height: 0.86;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.hero-copy,
.lead {
  max-width: 660px;
  color: #303640;
  font-size: clamp(1rem, 2vw, 1.24rem);
}

.button-row {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-weight: 850;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #fff;
  background: var(--ink);
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.5);
}

.status-band {
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(18px, 4vw, 56px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.status-band div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.status-band strong {
  overflow-wrap: anywhere;
}

.section-block,
.feature-grid,
.motion-strip,
.cta-band,
.docs-layout {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.section-block {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1.14fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: start;
  padding: clamp(68px, 9vw, 120px) 0 42px;
}

.section-heading {
  position: sticky;
  top: 94px;
}

.command-panel,
.feature-card,
.endpoint-callout,
.endpoint-row,
.error-grid > div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.command-panel {
  overflow: hidden;
}

.terminal-top {
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

pre {
  margin: 0;
  overflow-x: auto;
  color: #f9f2e7;
  background: #15181f;
}

pre code {
  display: block;
  min-width: max-content;
  padding: clamp(18px, 3vw, 28px);
  font-size: 0.92rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 26px 0 clamp(64px, 9vw, 120px);
}

.feature-card {
  min-height: 220px;
  padding: 22px;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.feature-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
}

.number {
  display: inline-block;
  margin-bottom: 44px;
  color: var(--gold);
  font-weight: 900;
}

.feature-card p,
.endpoint-row p,
.error-grid p,
.doc-list {
  color: var(--muted);
}

.motion-strip {
  padding: 0 0 clamp(64px, 8vw, 110px);
}

.motion-track {
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
}

.motion-track span {
  flex: 1;
  min-width: 92px;
  padding: 11px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--slate);
  font-size: 0.9rem;
  font-weight: 850;
  text-align: center;
  animation: pulse-step 4s ease-in-out infinite;
}

.motion-track span:nth-child(2) {
  background: var(--blue);
  animation-delay: 400ms;
}

.motion-track span:nth-child(3) {
  background: var(--green);
  animation-delay: 800ms;
}

.motion-track span:nth-child(4) {
  background: var(--red);
  animation-delay: 1200ms;
}

.cta-band {
  justify-content: space-between;
  gap: 24px;
  padding: 42px 0 72px;
  border-top: 1px solid var(--line);
}

.cta-band h2 {
  max-width: 780px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 68px);
  padding: clamp(42px, 6vw, 74px) 0 96px;
}

.docs-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  align-self: start;
  border-left: 1px solid var(--line);
}

.docs-sidebar a {
  padding: 10px 0 10px 16px;
  color: var(--muted);
  font-weight: 750;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.docs-sidebar a:hover {
  color: var(--ink);
  transform: translateX(4px);
}

.docs-content {
  min-width: 0;
}

.doc-section {
  scroll-margin-top: 100px;
  padding-bottom: 54px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 54px;
}

.doc-section h1 {
  max-width: 760px;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
}

.doc-section h2 {
  font-size: clamp(1.85rem, 4vw, 3rem);
}

.doc-section h3 {
  margin: 28px 0 10px;
}

.endpoint-callout {
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  margin-top: 28px;
}

.endpoint-callout span {
  color: var(--muted);
  font-weight: 850;
}

.endpoint-callout code,
.endpoint-row code,
td code,
.doc-list code {
  color: var(--blue);
}

.endpoint-list,
.error-grid {
  display: grid;
  gap: 12px;
}

.endpoint-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px 18px;
  padding: 16px;
}

.endpoint-row p {
  grid-column: 2;
  margin: 0;
}

.method {
  display: inline-grid;
  min-height: 32px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
}

.method.get {
  background: var(--green);
}

.method.post {
  background: var(--blue);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--slate);
  font-size: 0.82rem;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.error-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.error-grid > div {
  padding: 18px;
}

.error-grid strong {
  color: var(--red);
  font-size: 1.4rem;
}

.doc-list {
  padding-left: 20px;
}

.doc-list li + li {
  margin-top: 10px;
}

@keyframes slow-pan {
  from {
    transform: scale(1.04) translateX(-1.4%);
  }
  to {
    transform: scale(1.08) translateX(1.4%);
  }
}

@keyframes reveal-cut {
  from {
    clip-path: inset(0 4% 0 58%);
  }
  to {
    clip-path: inset(0 0 0 36%);
  }
}

@keyframes scan {
  from {
    left: 42%;
  }
  to {
    left: 63%;
  }
}

@keyframes float-product {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-14px) rotate(1deg);
  }
}

@keyframes pulse-step {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@media (max-width: 880px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .hero {
    min-height: auto;
  }

  .hero::after {
    background: rgba(245, 240, 231, 0.84);
  }

  .hero-after {
    width: min(72vw, 420px);
  }

  .hero-content {
    margin-left: 18px;
    padding-top: 76px;
    padding-bottom: 92px;
  }

  .status-band,
  .cta-band {
    align-items: stretch;
    flex-direction: column;
  }

  .section-block,
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .docs-sidebar {
    position: static;
  }

  .docs-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .docs-sidebar a {
    padding: 10px;
  }

  .feature-grid,
  .error-grid {
    grid-template-columns: 1fr;
  }

  .motion-track {
    align-items: stretch;
    flex-direction: column;
    border-radius: var(--radius);
  }
}

@media (max-width: 560px) {
  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .hero-after-wrap {
    clip-path: inset(28% 0 0 0);
  }

  .scan-line {
    display: none;
  }

  .button {
    width: 100%;
  }

  .endpoint-row {
    grid-template-columns: 1fr;
  }

  .endpoint-row p {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
