* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: #08080a;
  color: #fff;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, .brand span, nav a, .btn {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
}

@keyframes arrowSpin {
  0% { transform: translateX(0) rotate(0deg); }
  60% { transform: translateX(6px) rotate(360deg); }
  100% { transform: translateX(4px) rotate(360deg); }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Header */
header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: #0a0a0c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 48px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: -12px;
}

header .brand img {
  height: 76px;
  width: auto;
  display: block;
}

header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

header nav a {
  position: relative;
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  opacity: 0.92;
  z-index: 1;
  transition: opacity 0.2s ease, color 0.2s ease;
}

header nav a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: #e8332a;
  transform: scale(0.6);
  opacity: 0;
  z-index: -1;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

header nav a:hover {
  opacity: 1;
  color: #fff;
}

header nav a:hover::after {
  transform: scale(1);
  opacity: 1;
}

header nav a.active::after {
  transform: scale(1);
  opacity: 1;
  background: #3a3a40;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}

.nav-toggle span:nth-child(1) { top: 10px; }
.nav-toggle span:nth-child(2) { top: 15px; }
.nav-toggle span:nth-child(3) { top: 20px; }

header.nav-open .nav-toggle span:nth-child(1) { top: 15px; transform: rotate(45deg); }
header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
header.nav-open .nav-toggle span:nth-child(3) { top: 15px; transform: rotate(-45deg); }

@media (max-width: 640px) {
  header { padding: 14px 16px; }
  header .brand img { height: 56px; }
  .nav-toggle { display: block; }
  header nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(78vw, 300px);
    background: #0a0a0c;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    padding: 90px 32px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -10px 0 30px rgba(0,0,0,0.35);
  }
  header.nav-open nav { transform: translateX(0); }
  header nav a { width: 100%; padding: 12px 14px; font-size: 16px; }
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #0a0a0a;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.4s ease 0.05s;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #e8332a;
  transform: scaleX(0);
  transform-origin: left;
  z-index: -1;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

.btn-label, .btn .arrow {
  position: relative;
  z-index: 1;
}

.btn:hover {
  transform: translateY(-3px);
  color: #fff;
  box-shadow: 0 10px 24px rgba(232,51,42,0.45);
}

.btn:hover::after {
  transform: scaleX(1);
}

.btn .arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0a0a0a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn:hover .arrow {
  background: #fff;
  color: #e8332a;
  animation: arrowSpin 0.6s ease forwards;
}

/* Docs layout */
.docs-header {
  padding: 40px 8vw 0;
  max-width: 1180px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #999;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #fff;
}

.docs {
  max-width: 1180px;
  margin: 20px auto 100px;
  padding: 0 8vw;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav .docs-nav-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a6970;
  margin-bottom: 10px;
}

.docs-nav a {
  position: relative;
  display: block;
  padding: 8px 12px 8px 16px;
  border-radius: 8px;
  color: #9a98a5;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.docs-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  border-radius: 2px;
  background: #e8332a;
  transition: transform 0.2s ease;
}

.docs-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
  padding-left: 20px;
}

.docs-nav a:hover::before {
  transform: translateY(-50%) scaleY(1);
}

.docs-nav a.active {
  color: #fff;
  background: rgba(232,51,42,0.15);
  font-weight: 600;
}

.docs-nav a.active::before {
  transform: translateY(-50%) scaleY(1);
}

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

.doc-section {
  scroll-margin-top: 100px;
}

.doc-section h1 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 16px;
}

.doc-section h2 {
  font-size: 20px;
  margin: 28px 0 8px;
}

.doc-section h2:first-of-type {
  margin-top: 8px;
}

.doc-section p {
  color: #b3b3b3;
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 12px;
}

.doc-section ul {
  margin: 8px 0 12px 20px;
  color: #b3b3b3;
  font-size: 15px;
  line-height: 1.8;
}

.doc-section code {
  background: #1c1c20;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 13px;
  color: #ffb4af;
}

.doc-section pre {
  background: #111114;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: #d6d6d6;
  margin: 12px 0;
}

.doc-section pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.callout {
  display: flex;
  gap: 12px;
  background: rgba(232,51,42,0.08);
  border: 1px solid rgba(232,51,42,0.3);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #f2c9c6;
}

.callout .callout-icon {
  flex-shrink: 0;
  font-weight: 800;
  color: #e8332a;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13.5px;
}

.doc-table th, .doc-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.15s ease;
}

.doc-table tbody tr:hover td {
  background: rgba(255,255,255,0.03);
}

.doc-table th {
  color: #fff;
  font-weight: 700;
  background: #111114;
}

.doc-table td {
  color: #9a98a5;
}

.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.flow-step .flow-number {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1c1c20;
  border: 1px solid rgba(232,51,42,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}

.flow-step p {
  margin: 0;
  color: #b3b3b3;
  font-size: 15px;
  line-height: 1.6;
}

.screenshot {
  margin: 16px 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  transition: border-color 0.3s ease;
}

.screenshot:hover {
  border-color: rgba(232,51,42,0.5);
}

.screenshot img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.screenshot:hover img {
  transform: scale(1.02);
}

.screenshot-caption {
  font-size: 12.5px;
  color: #6a6970;
  padding: 8px 4px 0;
}

.doc-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.doc-pager a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fff;
  text-decoration: none;
  padding: 14px 18px;
  border-radius: 12px;
  background: #111114;
  border: 1px solid rgba(255,255,255,0.08);
  max-width: 46%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.doc-pager a:hover {
  border-color: rgba(232,51,42,0.5);
  transform: translateY(-2px);
}

.doc-pager a.next {
  margin-left: auto;
  text-align: right;
  align-items: flex-end;
}

.doc-pager .pager-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6a6970;
}

.doc-pager .pager-title {
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .docs {
    grid-template-columns: 1fr;
  }
  .docs-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
  }
  .docs-nav .docs-nav-title { display: none; }
  .docs-nav a {
    padding: 6px 12px;
    background: #111114;
    border: 1px solid rgba(255,255,255,0.08);
  }
}

/* Footer */
footer {
  background: #050506;
  padding: 40px 24px 28px;
  text-align: center;
}

footer .footer-logo {
  height: 70px;
  width: auto;
  margin: 0 auto 14px;
  display: block;
}

footer .copyright {
  font-size: 14px;
  color: #cfcfd6;
  margin-bottom: 18px;
}

footer .disclaimer {
  font-size: 13px;
  color: #9a98a5;
  margin-bottom: 14px;
}

footer .trademarks {
  font-size: 13px;
  color: #9a98a5;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

footer .trademarks strong {
  color: #cfcfd6;
  font-weight: 700;
}
