/* =========================================================
   Design tokens / reset
========================================================= */
:root {
  --bg: #f5f5f7;
  --surface: #fff;
  --text: #111114;
  --muted: #6e6e73;
  --line: rgba(17, 17, 20, .08);
  --blue: #0071e3;
  --radius: 28px;
  --shadow: 0 28px 70px rgba(0, 0, 0, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#top,
.docs-main,
.pricing-main,
.privacy-main {
  position: relative;
  isolation: isolate;
}

#top::before,
.docs-main::before,
.pricing-main::before,
.privacy-main::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 620px;
  background-color: #f8faff;
  background-image:
    radial-gradient(ellipse at 18% 24%, rgba(91, 144, 255, .09), transparent 44%),
    radial-gradient(ellipse at 78% 42%, rgba(140, 118, 244, .06), transparent 40%),
    linear-gradient(rgba(82, 119, 192, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 119, 192, .035) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 100%);
  pointer-events: none;
}

#top::before { height: 760px; }

@media (max-width: 980px) {
  #top::before { height: 1080px; }
}

@media (max-width: 700px) {
  #top::before,
  .docs-main::before,
  .pricing-main::before,
  .privacy-main::before { height: 700px; }
}

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

/* =========================================================
   Header / navigation
========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(18px);
  background: rgba(245, 245, 247, .78);
  border-bottom: 1px solid transparent;
  transition: .25s;
}

.site-header.scrolled { border-bottom-color: var(--line); }

.nav-shell {
  height: 58px;
  width: min(1180px, calc(100% - 40px));
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -.02em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
}

.brand-mark svg { width: 100%; fill: #111; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-mark .brand-cut { fill: var(--bg); }
.brand-mark.small { width: 22px; height: 22px; }

.desktop-nav {
  display: flex;
  gap: 30px;
}

.desktop-nav a,
.footer-links a,
.footer-links span {
  color: #424245;
  text-decoration: none;
  font-size: 14px;
}

.desktop-nav a:hover,
.footer-links a:hover { color: #000; }
.desktop-nav a.active { color: #111; font-weight: 650; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-button {
  display: none;
  background: transparent;
  border: 0;
  width: 34px;
  height: 34px;
}

.menu-button span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: #111;
  margin: 5px auto;
}

.mobile-nav { display: none; }

/* =========================================================
   Footer
========================================================= */
.site-footer {
  padding: 0 0 45px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 26px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.copyright {
  color: #999;
  font-size: 12px;
}

/* =========================================================
   Shared reveal animation
========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] { transition-delay: .12s; }

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .menu-button { display: block; }

  .mobile-nav.open {
    display: flex;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    padding: 14px 20px 22px;
    flex-direction: column;
    gap: 16px;
    background: rgba(245, 245, 247, .96);
    border-bottom: 1px solid var(--line);
  }

  .mobile-nav a {
    text-decoration: none;
    color: #111;
  }

  .site-footer { grid-template-columns: 1fr; }
  .copyright { margin: 0; }
}

@media (max-width: 600px) {
  .section-shell,
  .nav-shell {
    width: min(100% - 24px, 1180px);
  }

  .site-footer { padding-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
}
