/* Figblox - design tokens & layout */
:root {
  --bg: #0a0a0c;
  --surface: #111115;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f0f5;
  --muted: #71717a;
  /* Neutral accent: light zinc fill on dark UI */
  --accent: #f4f4f5;
  --on-accent: #0a0a0b;
  --accent-hover: #fafafa;
  --link: #a1a1aa;
  --link-hover: #e4e4e7;
  --ring: rgba(255, 255, 255, 0.42);
  --radius-card: 14px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --font: "Space Grotesk", system-ui, sans-serif;
  --green-dot: #22c55e;
  --check: #22c55e;
  /* Docs section anchors (in-page); hash scroll-to-center is handled in main.js */
  --scroll-pad: 5.75rem;
  /* Motion — shared easings & durations */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-fast: 0.18s;
  --t-med: 0.28s;
  --t-slow: 0.48s;
}

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

html {
  /* Centered hash targets (main.js); avoid extra top offset fighting vertical centering */
  scroll-padding-top: 0;
  scroll-behavior: auto;
}

@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  html {
    scroll-behavior: smooth;
  }
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

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

a:hover:not(.btn) {
  color: var(--text);
  opacity: 0.9;
}

@media (prefers-reduced-motion: no-preference) {
  a:not(.btn) {
    transition:
      color var(--t-fast) var(--ease-smooth),
      opacity var(--t-fast) var(--ease-smooth),
      border-color var(--t-fast) var(--ease-smooth),
      box-shadow var(--t-med) var(--ease-smooth),
      transform var(--t-med) var(--ease-smooth);
  }

  .nav__brand .nav__wordmark {
    transition: opacity var(--t-fast) var(--ease-smooth);
  }
}

img {
  max-width: 100%;
  height: auto;
}

.muted {
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nowrap {
  white-space: nowrap;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

/* Buttons — shared chrome for every variant */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.625rem 1.25rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--t-fast) var(--ease-smooth),
    border-color var(--t-fast) var(--ease-smooth),
    color var(--t-fast) var(--ease-smooth),
    box-shadow var(--t-fast) var(--ease-smooth),
    transform var(--t-fast) var(--ease-smooth),
    opacity var(--t-fast) var(--ease-smooth);
}

.btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn--primary:hover:not(:disabled) {
  background: #ffffff;
  color: var(--on-accent);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}

.btn--primary:active:not(:disabled) {
  background: var(--accent-hover);
  color: var(--on-accent);
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.btn--secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.btn--secondary:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.btn--hero-dark {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.btn--hero-dark:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn--hero-dark:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .btn--primary:hover:not(:disabled),
  .btn--secondary:hover:not(:disabled),
  .btn--hero-dark:hover:not(:disabled) {
    transform: none;
  }

  .btn--primary:active:not(:disabled),
  .btn--secondary:active:not(:disabled),
  .btn--hero-dark:active:not(:disabled),
  .btn:active:not(:disabled) {
    transform: none;
  }
}

.btn--pill {
  border-radius: var(--radius-pill);
}

.btn--block {
  width: 100%;
}

.btn--dimmed {
  opacity: 0.65;
  pointer-events: auto;
}

.btn--dimmed:hover {
  opacity: 0.85;
}

button.btn:disabled {
  opacity: 0.85;
  cursor: default;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background var(--t-med) var(--ease-smooth),
    backdrop-filter var(--t-med) var(--ease-smooth),
    border-color var(--t-med) var(--ease-smooth);
}

.site-header.is-scrolled {
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  gap: 1rem;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  justify-self: start;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
  font-size: 1.125rem;
}

.nav__brand:hover .nav__wordmark {
  opacity: 0.92;
}

/* Sized to wordmark em; tune height for optical balance with bold caps */
.nav__brand img,
.nav__logo {
  display: block;
  flex-shrink: 0;
  height: 1.08em;
  width: auto;
}

.nav__wordmark {
  font-weight: 700;
  font-size: 1em;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.nav__links a:hover {
  color: var(--text);
}

.nav__links--center {
  justify-self: center;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-self: end;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  justify-self: end;
  grid-column: 3;
  line-height: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.nav__toggle:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.nav__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  flex-shrink: 0;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--t-med) var(--ease-smooth), opacity var(--t-fast) var(--ease-smooth);
}

.site-header.menu-open .nav__toggle-bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.site-header.menu-open .nav__toggle-bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Fixed sibling of <header> so iOS/Safari paint full-viewport dim (fixed inside backdrop-filter ancestors breaks). */
.nav-overlay {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 57px;
  bottom: 0;
  z-index: 150;
  padding: 2rem 1.5rem;
  padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  background: rgba(5, 6, 9, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overscroll-behavior: contain;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.site-header.menu-open ~ .nav-overlay {
  display: block;
}

.nav-overlay__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-size: 1.125rem;
}

/* Plain links only — .btn variants keep their own colors (was overriding .btn--primary) */
.nav-overlay__links a:not(.btn) {
  color: var(--text);
}

.nav-overlay__cta {
  margin-top: 0.75rem;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .nav {
    grid-template-columns: 1fr auto;
  }

  .nav__links--center,
  .nav__actions {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }
}

/* Sections */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  text-align: center;
}

.section--hero {
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.section__label {
  margin-bottom: 1.25rem;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.section__title--lg {
  font-size: clamp(2rem, 5vw, 2.75rem);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section__body {
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 1.0625rem;
}

.section__sub {
  margin: 0 0 2.5rem;
  font-size: 1.0625rem;
}

/* Hero */
.hero__badge {
  margin: 0 auto 1.75rem;
}

.hero__title {
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 auto 1.25rem;
  max-width: 800px;
}

.hero__sub {
  font-size: 1.125rem;
  max-width: min(50rem, 100%);
  margin: 0 auto 2rem;
  line-height: 1.65;
  text-wrap: balance;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

/* Badges & chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.badge--pill {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  transition:
    border-color var(--t-fast) var(--ease-smooth),
    background-color var(--t-fast) var(--ease-smooth);
}

.badge__dot {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-dot);
}

.badge__dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, 0.45);
  animation: badge-dot-pulse 2.25s ease-out infinite;
  pointer-events: none;
}

@keyframes badge-dot-pulse {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  100% {
    transform: scale(2.35);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .badge__dot::before {
    display: none;
  }

  .badge__dot {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  }
}

.badge--muted {
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto;
}

@media (max-width: 520px) {
  .chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.35rem;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .chip {
    flex-shrink: 0;
  }
}

.chip {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.875rem;
  color: var(--muted);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

/* Hero video — height follows intrinsic 1662×1080 aspect via width/height on <video> (no letterboxing from a mismatched box) */
.hero-video-wrap {
  width: 100%;
  max-width: min(1120px, 100%);
  margin: 2rem auto 0;
  padding: 0 0 1rem;
}

.hero-video {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 0;
  background: #0c0c0e;
  line-height: 0;
}

.hero-video__media {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-video {
    transition:
      box-shadow var(--t-slow) var(--ease-out-soft),
      transform var(--t-med) var(--ease-out-soft),
      border-color var(--t-fast) var(--ease-smooth);
  }

  .hero-video:hover {
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.42);
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video:hover {
    transform: none;
  }
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: min(920px, 100%);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (max-width: 700px) {
  .features {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  width: 100%;
  padding: 2.5rem;
  text-align: center;
}

.feature-card__check {
  display: block;
  color: var(--check);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0.75rem;
}

.feature-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.feature-card__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* Glass hover — feature & pricing cards only (not .hero-video.card) */
.feature-card.card,
.pricing-card.card {
  transition:
    background-color var(--t-med) var(--ease-out-soft),
    border-color var(--t-med) var(--ease-out-soft),
    box-shadow var(--t-med) var(--ease-out-soft),
    backdrop-filter var(--t-slow) var(--ease-out-soft),
    -webkit-backdrop-filter var(--t-slow) var(--ease-out-soft),
    transform var(--t-med) var(--ease-out-soft);
}

@media (prefers-reduced-motion: reduce) {
  .feature-card.card,
  .pricing-card.card {
    transition: none;
  }
}

@media (hover: hover) {
  .feature-card.card:hover {
    background: rgba(17, 17, 21, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
      0 12px 40px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
  }

  .pricing-card.card:hover {
    background: rgba(17, 17, 21, 0.52);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow:
      0 16px 48px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
  }

  .pricing-card.card.pricing-card--highlight:hover {
    background: rgba(22, 22, 26, 0.62);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow:
      0 20px 56px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(255, 255, 255, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }
}

@media (hover: hover) and (prefers-reduced-motion: reduce) {
  .feature-card.card:hover,
  .pricing-card.card:hover {
    transform: none;
  }
}

/* Platform */
.platform__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  text-align: left;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .platform__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .platform__text {
    order: 1;
  }

  .platform__visual {
    order: 2;
  }

  .checklist {
    display: inline-block;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
  }
}

.platform__label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

.platform__title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  line-height: 1.15;
}

.platform__body {
  margin: 0 0 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1.85;
}

.checklist li {
  position: relative;
  padding-left: 1.5rem;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--check);
  font-weight: 600;
}

.platform__visual.platform__figure {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: transparent;
  border: none;
  align-self: stretch;
}

.platform__img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

@media (prefers-reduced-motion: no-preference) {
  .platform__visual.platform__figure .platform__img {
    transition: transform var(--t-slow) var(--ease-out-soft);
  }

  .platform__visual.platform__figure:hover .platform__img {
    transform: scale(1.012);
  }
}

/* Pricing */
.pricing-section {
  scroll-margin-top: 6rem;
}

@media (min-width: 901px) {
  .pricing-section {
    scroll-margin-top: 4rem;
  }
}

.pricing-section .section__title {
  margin-bottom: 0.5rem;
}

.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 1040px;
  margin: 0 auto;
  text-align: left;
}

@media (max-width: 900px) {
  .pricing {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

.pricing-card {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem;
  min-height: 420px;
  border-radius: var(--radius-card);
}

.pricing-card--highlight {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.pricing-card__tier {
  font-size: 0.8125rem;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pricing-card__price {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  line-height: 1.1;
}

.pricing-card__suffix {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

.pricing-card__price--soon {
  font-size: 1.5rem;
}

.pricing-card__desc {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  flex-grow: 0;
}

.pricing-card .btn {
  margin-bottom: 1.5rem;
}

.pricing-card__rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 1.25rem;
}

.pricing-card__features {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  flex-grow: 1;
}

.pricing-card__features li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.65rem;
  line-height: 1.45;
}

.pricing-card__features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--check);
  font-weight: 600;
  font-size: 0.85rem;
}

.pricing-footnote {
  text-align: center;
  font-size: 0.9375rem;
  margin: 2rem auto 0;
  max-width: 36rem;
  line-height: 1.55;
}

/* FAQ */
.faq .section__title {
  margin-bottom: 2.5rem;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  background: none;
  border: none;
  border-radius: 0.5rem;
  color: var(--text);
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  line-height: 1.35;
  transition: background-color var(--t-fast) var(--ease-smooth);
}

.faq-item__q:hover {
  background: rgba(255, 255, 255, 0.04);
}

.faq-item__q:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.faq-item__chev {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform var(--t-med) var(--ease-out-soft);
  margin-top: -4px;
}

.faq-item__q[aria-expanded="true"] .faq-item__chev {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.faq-item__a {
  padding: 0 0 1.25rem;
}

.faq-item__a p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
}

/* Footer */
.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  border-top: 1px solid var(--border);
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .footer__top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer__brand {
  font-weight: 700;
  font-size: 1.125rem;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.footer__tag {
  margin: 0;
  font-size: 0.9375rem;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .footer__cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

.footer__heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 1rem;
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__col li {
  margin-bottom: 0.65rem;
}

.footer__col a {
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer__col a:hover {
  color: var(--text);
}

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer__bar-links a {
  color: var(--muted);
}

.footer__bar-links a:hover {
  color: var(--text);
}

.footer__sep {
  margin: 0 0.35rem;
  opacity: 0.6;
}

/* IO fade - only when JS runs (see main.js). Light motion avoids layout “jumps”. */
html.js .io-fade:not(.io-fade--stagger):not(.io-fade--split) {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--t-slow) var(--ease-out-soft),
    transform var(--t-slow) var(--ease-out-soft);
}

html.js .io-fade:not(.io-fade--stagger):not(.io-fade--split).is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger sections: wrapper stays in flow; children animate when section gets .is-visible */
html.js .io-fade.io-fade--stagger {
  opacity: 1;
  transform: none;
}

html.js .features.io-fade--stagger:not(.is-visible) article.feature-card {
  opacity: 0;
  transform: translateY(26px);
}

html.js .features.io-fade--stagger article.feature-card {
  transition:
    opacity calc(var(--t-slow) + 0.06s) var(--ease-out-soft),
    transform calc(var(--t-slow) + 0.12s) var(--ease-out-soft);
}

html.js .features.io-fade--stagger.is-visible article.feature-card:nth-child(2) {
  transition-delay: 0.04s;
}

html.js .features.io-fade--stagger.is-visible article.feature-card:nth-child(3) {
  transition-delay: 0.11s;
}

html.js .features.io-fade--stagger.is-visible article.feature-card:nth-child(4) {
  transition-delay: 0.18s;
}

html.js .features.io-fade--stagger.is-visible article.feature-card:nth-child(5) {
  transition-delay: 0.25s;
}

html.js .features.io-fade--stagger.is-visible article.feature-card {
  opacity: 1;
  transform: translateY(0);
}

html.js .pricing-section.io-fade--stagger:not(.is-visible) .section__title,
html.js .pricing-section.io-fade--stagger:not(.is-visible) .section__sub {
  opacity: 0;
  transform: translateY(18px);
}

html.js .pricing-section.io-fade--stagger:not(.is-visible) .pricing-card {
  opacity: 0;
  transform: translateY(28px);
}

html.js .pricing-section.io-fade--stagger:not(.is-visible) .pricing-footnote {
  opacity: 0;
  transform: translateY(12px);
}

html.js .pricing-section.io-fade--stagger .section__title,
html.js .pricing-section.io-fade--stagger .section__sub {
  transition:
    opacity calc(var(--t-slow) + 0.05s) var(--ease-out-soft),
    transform calc(var(--t-slow) + 0.05s) var(--ease-out-soft);
}

html.js .pricing-section.io-fade--stagger .pricing-card {
  transition:
    opacity calc(var(--t-slow) + 0.08s) var(--ease-out-soft),
    transform calc(var(--t-slow) + 0.14s) var(--ease-out-soft);
}

html.js .pricing-section.io-fade--stagger .pricing-footnote {
  transition:
    opacity var(--t-slow) var(--ease-out-soft),
    transform var(--t-slow) var(--ease-out-soft);
}

html.js .pricing-section.io-fade--stagger.is-visible .section__title,
html.js .pricing-section.io-fade--stagger.is-visible .section__sub {
  opacity: 1;
  transform: translateY(0);
}

html.js .pricing-section.io-fade--stagger.is-visible .pricing-footnote {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.32s;
}

html.js .pricing-section.io-fade--stagger.is-visible .pricing-card:nth-child(1) {
  transition-delay: 0.06s;
}

html.js .pricing-section.io-fade--stagger.is-visible .pricing-card:nth-child(2) {
  transition-delay: 0.14s;
}

html.js .pricing-section.io-fade--stagger.is-visible .pricing-card:nth-child(3) {
  transition-delay: 0.22s;
}

html.js .pricing-section.io-fade--stagger.is-visible .pricing-card {
  opacity: 1;
  transform: translateY(0);
}

/* Platform: copy from one side, banner from the other */
html.js .io-fade.io-fade--split {
  opacity: 1;
  transform: none;
}

html.js .platform.io-fade--split:not(.is-visible) .platform__text {
  opacity: 0;
  transform: translateX(-28px);
}

html.js .platform.io-fade--split:not(.is-visible) .platform__visual {
  opacity: 0;
  transform: translateX(28px);
}

html.js .platform.io-fade--split .platform__text,
html.js .platform.io-fade--split .platform__visual {
  transition:
    opacity calc(var(--t-slow) + 0.1s) var(--ease-out-soft),
    transform calc(var(--t-slow) + 0.18s) var(--ease-out-soft);
}

html.js .platform.io-fade--split.is-visible .platform__visual {
  transition-delay: 0.06s;
}

html.js .platform.io-fade--split.is-visible .platform__text,
html.js .platform.io-fade--split.is-visible .platform__visual {
  opacity: 1;
  transform: none;
}

@media (max-width: 860px) {
  html.js .platform.io-fade--split:not(.is-visible) .platform__text,
  html.js .platform.io-fade--split:not(.is-visible) .platform__visual {
    transform: translateY(22px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js .io-fade:not(.io-fade--stagger):not(.io-fade--split),
  html.js .io-fade:not(.io-fade--stagger):not(.io-fade--split).is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  html.js .features.io-fade--stagger:not(.is-visible) article.feature-card,
  html.js .features.io-fade--stagger.is-visible article.feature-card,
  html.js .pricing-section.io-fade--stagger:not(.is-visible) .section__title,
  html.js .pricing-section.io-fade--stagger:not(.is-visible) .section__sub,
  html.js .pricing-section.io-fade--stagger:not(.is-visible) .pricing-card,
  html.js .pricing-section.io-fade--stagger:not(.is-visible) .pricing-footnote,
  html.js .pricing-section.io-fade--stagger.is-visible .section__title,
  html.js .pricing-section.io-fade--stagger.is-visible .section__sub,
  html.js .pricing-section.io-fade--stagger.is-visible .pricing-card,
  html.js .pricing-section.io-fade--stagger.is-visible .pricing-footnote,
  html.js .platform.io-fade--split:not(.is-visible) .platform__text,
  html.js .platform.io-fade--split:not(.is-visible) .platform__visual,
  html.js .platform.io-fade--split.is-visible .platform__text,
  html.js .platform.io-fade--split.is-visible .platform__visual {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Docs / inner pages */
.page-hero {
  padding-top: 3rem;
  padding-bottom: 2rem;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.page-hero p {
  margin: 0;
  font-size: 1.125rem;
}

.prose {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  text-align: left;
}

.prose h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  font-weight: 700;
}

.prose p,
.prose li {
  color: var(--muted);
  line-height: 1.7;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose a:not(.btn) {
  color: var(--link);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-smooth);
}

.prose a:not(.btn):hover {
  color: var(--link-hover);
}

/* Docs layout (sidebar + article scroll together; nav switches pages) */
.docs-page .site-header {
  border-bottom-color: var(--border);
}

.docs-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  align-items: flex-start;
}

@media (min-width: 1024px) {
  .docs-layout {
    flex-direction: row;
    gap: 2.5rem;
  }
}

.docs-sidebar {
  width: 100%;
  flex: none;
}

@media (min-width: 1024px) {
  .docs-sidebar {
    position: static;
    top: auto;
    width: 16rem;
    align-self: flex-start;
  }
}

.docs-sidebar__card {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.docs-sidebar__head {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.docs-sidebar__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.docs-sidebar__desc {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
}

.docs-nav {
  padding: 1rem 1rem 1.25rem;
}

.docs-nav__group + .docs-nav__group {
  margin-top: 1.25rem;
}

.docs-nav__label {
  margin: 0;
  padding: 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.docs-nav__list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
}

.docs-nav__list li + li {
  margin-top: 0.125rem;
}

.docs-nav__link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  color: var(--muted);
  transition:
    background var(--t-fast) var(--ease-smooth),
    color var(--t-fast) var(--ease-smooth),
    border-color var(--t-fast) var(--ease-smooth);
}

.docs-nav__link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.docs-nav__link.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-main {
  min-width: 0;
  flex: 1;
  width: 100%;
}

.docs-article-card {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.docs-article-head {
  border-bottom: 1px solid var(--border);
  padding: 2rem 2rem 1.75rem;
}

.docs-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.docs-h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.docs-lead {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 42rem;
}

.docs-markdown {
  padding: 2.25rem 2rem 2.5rem;
  max-width: 48rem;
}

.docs-section {
  scroll-margin-top: var(--scroll-pad);
}

.docs-section + .docs-section {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.docs-markdown h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.docs-markdown h3 {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.docs-markdown h4 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.docs-markdown p,
.docs-markdown li {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

.docs-markdown p {
  margin: 0 0 1rem;
}

.docs-markdown ul,
.docs-markdown ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.docs-markdown ul li,
.docs-markdown ol li {
  margin-bottom: 0.35rem;
}

.docs-markdown a:not(.btn) {
  color: var(--link);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-smooth);
}

.docs-markdown a:not(.btn):hover {
  color: var(--link-hover);
}

.docs-subhead {
  margin: -0.25rem 0 1.25rem;
  font-size: 1rem;
}

/* Docs pricing page: same grid/cards as homepage */
body[data-doc-page="pricing"] .docs-markdown {
  max-width: min(70rem, 100%);
}

.docs-pricing-embed {
  margin: 0.5rem 0 1rem;
}

.docs-pricing-embed .pricing-footnote {
  margin: 1.5rem auto 0;
}

.docs-cta-row,
.docs-btn-row {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.docs-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.docs-steps li {
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
  color: var(--muted);
}

.docs-steps li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--link);
  font-weight: 600;
}

.docs-brand-line {
  margin: 1.5rem 0;
  font-size: 1.0625rem;
  line-height: 1.5;
}

.docs-ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.docs-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.docs-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.docs-table td:first-child {
  white-space: nowrap;
  font-family: ui-monospace, monospace;
  color: var(--text);
}

.docs-table td:last-child {
  color: var(--muted);
}

.docs-table tr:last-child td {
  border-bottom: none;
}

.docs-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--link-hover);
}

.docs-pre {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: #0c0c0e;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--text);
}

.docs-pre code {
  font-family: inherit;
  font-size: inherit;
  background: none;
  padding: 0;
  color: inherit;
}

.docs-dl {
  margin: 0 0 1rem;
}

.docs-dl dt {
  margin: 1rem 0 0.25rem;
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

.docs-dl dt:first-child {
  margin-top: 0;
}

.docs-dl dd {
  margin: 0 0 0.75rem;
  color: var(--muted);
  line-height: 1.7;
}

.docs-faq-block .docs-faq-q {
  margin: 1.25rem 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.docs-faq-block .docs-faq-q:first-child {
  margin-top: 0;
}

.docs-faq-block p {
  margin: 0 0 0.75rem;
}

.docs-back {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
