:root {
  color-scheme: light;
  --ink: #171712;
  --muted: #68675f;
  --base: #f0ede3;
  --paper: #f8f6ee;
  --line: rgba(25, 25, 20, 0.25);
  --accent: #eb4333;
  --blue: #2647ff;
  --lime: #dfff66;
  --orange: #ffb13b;
  --page: min(1240px, calc(100% - 2.5rem));
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --sans: Arial, Helvetica, sans-serif;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--base);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(25, 25, 20, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 25, 20, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  pointer-events: none;
}

::selection {
  color: var(--paper);
  background: var(--accent);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

.surface {
  width: var(--page);
  margin-inline: auto;
}

.page-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--page);
  min-height: 85px;
  margin-inline: auto;
}

.page-header::before {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100vw;
  height: 2px;
  content: "";
  background: var(--ink);
  transform: translateX(-50%);
}

.page-header::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12.5%;
  height: 8px;
  content: "";
  background: var(--accent);
}

.mark {
  display: inline-flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.mark-logo {
  display: block;
  width: clamp(105px, 10vw, 135px);
  height: auto;
}

.mark-api {
  margin-top: clamp(0.80rem, 1.5vw, 1.05rem);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  line-height: 1;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: clamp(1rem, 2.75vw, 2.5rem);
  align-items: center;
}

.nav-link {
  position: relative;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.nav-link:not(.nav-access)::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 150ms ease;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.nav-access {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.65rem;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.175fr) minmax(375px, 0.825fr);
  gap: 0;
  align-items: stretch;
  min-height: min(790px, calc(100svh - 86px));
  padding-block: 0;
}

.hero > .reveal:first-child {
  display: flex;
  padding: clamp(4.5rem, 9vw, 8rem) clamp(2.2rem, 6vw, 6.4rem) 3.2rem 0;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin: 0 0 1.75rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.125em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 64px;
  height: 8px;
  content: "";
  background: var(--accent);
}

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

h1 {
  max-width: 780px;
  margin-bottom: 1.85rem;
  font-size: clamp(3.5rem, 6.5vw, 6rem);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.85;
}

.hero-highlight {
  display: block;
  color: var(--accent);
  margin-top: 0.05em;
  font-family: var(--serif);
  font-size: 1em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.85;
  text-transform: none;
  -webkit-text-stroke: 0;
}

.hero-copy {
  max-width: 590px;
  margin-bottom: 2.25rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.75vw, 1.25rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}

.button {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.05rem;
  font-family: var(--mono);
  font-size: 0.675rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  border: 1px solid var(--ink);
  text-transform: uppercase;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.button:hover {
  transform: translate(-4px, -4px);
  box-shadow: 4px 4px 0 var(--ink);
}

.button:focus-visible,
.copy-button:focus-visible,
.nav-link:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 4px;
}

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

.button-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

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

.button-secondary:hover {
  color: var(--paper);
  background: var(--blue);
  border-color: var(--blue);
}

.arrow {
  --arrow-size: 0.75rem;
  --arrow-stroke: 1.75px;
  position: relative;
  display: inline-block;
  flex: 0 0 var(--arrow-size);
  width: var(--arrow-size);
  height: var(--arrow-size);
  color: currentColor;
}

.arrow::before,
.arrow::after {
  position: absolute;
  content: "";
}

.arrow::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: var(--arrow-stroke);
  background: currentColor;
  transform: translateY(-50%);
}

.arrow::after {
  top: 50%;
  right: 0;
  width: 45%;
  height: 45%;
  border-top: var(--arrow-stroke) solid currentColor;
  border-right: var(--arrow-stroke) solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.arrow-up {
  transform: rotate(-90deg);
}

.spec-surface {
  display: flex;
  flex-wrap: wrap;
  gap: 1.45rem 2.5rem;
}

.spec {
  position: relative;
}

.spec:not(:last-child)::after {
  position: absolute;
  top: 0;
  right: -1.25rem;
  width: 1px;
  height: 100%;
  content: "";
  background: var(--line);
}

.spec-label,
.spec-value {
  display: block;
}

.spec-label {
  margin-bottom: 0.18rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.125em;
  text-transform: uppercase;
}

.spec-value {
  font-size: 0.75rem;
  font-weight: 800;
}

.terminal-surface {
  position: relative;
  display: flex;
  padding: clamp(4rem, 7.5vw, 6rem) 0 clamp(4rem, 7.5vw, 6rem) clamp(2rem, 5vw, 4rem);
  align-items: center;
  border-left: 1px solid var(--line);
}

.terminal-surface::before {
  position: absolute;
  top: 7.5%;
  right: -2.5%;
  width: 75%;
  height: 12px;
  content: "";
  background: var(--blue);
}

.terminal {
  position: relative;
  width: 100%;
  overflow: hidden;
  color: #e7eadf;
  background: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 14px 14px 0 var(--accent);
}

.terminal::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.035), transparent 33%);
  pointer-events: none;
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 1rem;
  color: var(--ink);
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.terminal-control {
  display: flex;
  gap: 0.375rem;
}

.terminal-dot {
  width: 8px;
  height: 8px;
  background: var(--blue);
}

.terminal-dot:first-child {
  background: var(--accent);
}

.terminal-dot:nth-child(2) {
  background: var(--orange);
}

.terminal-dot:last-child {
  background: var(--ink);
}

.terminal-title {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.terminal-body {
  min-height: 410px;
  padding: clamp(1.25rem, 3.5vw, 2rem);
  font-family: var(--mono);
  font-size: clamp(0.675rem, 1.15vw, 0.75rem);
  line-height: 1.85;
}

.terminal-line {
  margin-bottom: 1.35rem;
  color: #9d9f97;
}

.terminal-prompt {
  color: var(--lime);
}

.terminal-command {
  color: #f7f5ec;
}

.terminal-dim {
  color: #777a72;
}

.terminal-key {
  color: #8da0ff;
}

.terminal-cursor {
  display: inline-block;
  width: 0.65em;
  height: 1em;
  margin-left: 0.45em;
  vertical-align: -0.15em;
  background: var(--lime);
  animation: terminal-blink 1s steps(1, end) infinite;
}

@keyframes terminal-blink {
  50% {
    opacity: 0;
  }
}

.copy-button {
  position: absolute;
  z-index: 2;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--paper);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 750;
  text-transform: uppercase;
}

.copy-button:hover {
  color: var(--paper);
  background: var(--blue);
  border-color: var(--blue);
}

.section {
  padding-block: clamp(5.5rem, 10vw, 8rem);
}

.section-label {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.125em;
  text-transform: uppercase;
}

.section-label::before {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 0.55rem;
  content: "";
  background: var(--accent);
  vertical-align: -4px;
}

h2 {
  max-width: 820px;
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(2.75rem, 6.5vw, 6rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 1;
}

.endpoint-overview {
  position: relative;
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
  border-block: 0;
}

.endpoint-overview-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3.5rem, 8vw, 8rem);
  align-items: start;
}

.endpoint-overview .section-label::before {
  background: var(--lime);
}

.endpoint-overview-intro .section-label {
  margin-bottom: 1.25rem;
}

.endpoint-overview-intro h2 {
  margin-bottom: 1.5rem;
  color: var(--paper);
  font-size: clamp(2.75rem, 6.5vw, 3.75rem);
  line-height: 0.95;
}

.endpoint-overview-intro h2 span {
  display: block;
  white-space: nowrap;
}

.endpoint-overview-intro p {
  max-width: 460px;
  color: #93948d;
}

.endpoint-access {
  margin-top: 1.75rem;
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}

.endpoint-access:hover {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}

.endpoint-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  list-style: none;
}

.endpoint-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 1.25rem;
  padding: 1.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.21);
}

.endpoint-index {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.endpoint-title {
  margin-bottom: 0.35rem;
  font-size: 1rem;
  font-weight: 800;
}

.endpoint-copy {
  margin-bottom: 0;
  color: #93948d;
  font-size: 0.85rem;
}

.site-footer {
  color: var(--paper);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-footer-inner {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  min-height: 104px;
}

.footer-right {
  display: flex;
  gap: 1.5rem;
}

.back-to-top {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
}

.back-to-top .arrow {
  --arrow-size: 0.65rem;
  --arrow-stroke: 1px;
}

.footer-right a:hover {
  color: var(--accent);
}

.reveal {
  animation: enter 650ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.reveal-delay {
  animation-delay: 90ms;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@media (max-width: 1100px) {
  .endpoint-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero > .reveal:first-child {
    min-height: 680px;
    padding-right: 0;
  }

  .hero-copy {
    max-width: 680px;
  }

  .terminal-surface {
    width: 100%;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .terminal-surface::before {
    right: 0;
  }

  .terminal {
    width: min(680px, calc(100% - 14px));
  }
}

@media (max-width: 640px) {
  :root {
    --page: min(100% - 1.25rem, 1240px);
  }

  .page-header {
    min-height: 72px;
  }

  .nav-link:not(.nav-access) {
    display: none;
  }

  .hero > .reveal:first-child {
    min-height: 620px;
    padding-block: 4rem 3rem;
  }

  h1 {
    font-size: clamp(3.15rem, 15vw, 4.5rem);
  }

  .endpoint-overview-intro h2 {
    font-size: clamp(2rem, 10.5vw, 2.75rem);
  }

  .spec-surface {
    gap: 1.25rem 1.75rem;
  }

  .spec:not(:last-child)::after {
    right: -0.85rem;
  }

  .terminal-surface {
    padding-block: 4rem;
  }

  .terminal-body {
    min-height: 370px;
    overflow-x: auto;
  }

  .site-footer-inner {
    align-items: flex-start;
    padding-block: 1.65rem;
    flex-direction: column;
    justify-content: center;
  }

  .footer-right {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
