/**
 * Lightship site theme — full layout parity with ExperimentLightShipDesign.
 * Palette, header, footer, and docs chrome for static-pages.
 */
:root {
  --ink: #0a0e12;
  --frame: #d9d4cb;
  --frame-deep: #cfc8bc;
  --sand: #efe6d8;
  --sand-mute: rgba(239, 230, 216, 0.78);
  --accent: #c9a46a;
  --accent-strong: #e0ba78;
  --accent-deep: #8a6b35;
  --line: rgba(239, 230, 216, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Sora", "Avenir Next", system-ui, sans-serif;
  --radius: 1.1rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.site-lightship,
body.page-docs {
  margin: 0;
  min-height: 100vh;
  background: var(--frame) !important;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.page-docs {
  padding-top: var(--header-h);
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* —— Experiment-parity header —— */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1.25rem, 4vw, 2.75rem);
  color: var(--sand);
  background: rgba(10, 14, 18, 0.94);
  border-bottom: 1px solid rgba(239, 230, 216, 0.12);
  backdrop-filter: blur(12px);
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.site-header .brand-logo {
  height: 3.2rem;
  width: auto;
  max-width: min(58vw, 16.9rem);
  object-fit: contain;
}

@media (min-width: 820px) {
  .site-header .brand-logo {
    height: 3.55rem;
    max-width: 18.75rem;
  }
}

.site-header .nav-links {
  display: none;
  gap: 1.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.site-header .nav-links a:hover {
  opacity: 1;
  color: var(--accent-strong);
}

.site-header .nav-cta {
  flex-shrink: 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(239, 230, 216, 0.35);
  color: var(--sand);
  background: transparent;
}

.site-header .nav-cta:hover {
  background: var(--sand);
  color: var(--ink);
  border-color: var(--sand);
}

@media (min-width: 820px) {
  .site-header .nav-links {
    display: flex;
  }
}

.site-header .nav-mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(239, 230, 216, 0.35);
  background: transparent;
  color: var(--sand);
  cursor: pointer;
}

@media (min-width: 820px) {
  .site-header .nav-mobile-toggle {
    display: none;
  }
}

.site-header .nav-mobile {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(10, 14, 18, 0.97);
  border-bottom: 1px solid rgba(239, 230, 216, 0.12);
  padding: 1rem clamp(1.25rem, 4vw, 2.75rem) 1.25rem;
  flex-direction: column;
  gap: 0.85rem;
}

.site-header .nav-mobile.is-open {
  display: flex;
}

.site-header .nav-mobile a {
  color: var(--sand-mute);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-header .nav-mobile a:hover {
  color: var(--accent-strong);
}

@media (min-width: 820px) {
  .site-header .nav-mobile {
    display: none !important;
  }
}

/* —— Footer —— */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem clamp(1.25rem, 5vw, 4rem) 1.75rem;
  margin-top: 3rem;
  font-size: 0.75rem;
  color: rgba(10, 14, 18, 0.55);
  background: var(--frame-deep);
  border-top: 1px solid rgba(10, 14, 18, 0.08);
}

.site-footer a {
  color: rgba(10, 14, 18, 0.65);
}

.site-footer a:hover {
  color: var(--ink);
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}

/* —— Docs layout —— */
.docs-shell {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.75rem clamp(1rem, 3vw, 2rem) 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .docs-shell {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.75rem;
  }
}

.docs-sidebar {
  flex: 0 0 auto;
  width: 100%;
  max-height: none;
  overflow: auto;
  padding: 1.1rem 1rem;
  border: 1px solid rgba(10, 14, 18, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: none;
}

@media (min-width: 960px) {
  .docs-sidebar {
    width: 16.5rem;
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    max-height: calc(100vh - var(--header-h) - 2rem);
  }
}

.docs-sidebar .docs-product-mark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(10, 14, 18, 0.1);
}

.docs-sidebar .docs-product-mark img {
  height: 2rem;
  width: auto;
  border-radius: 0.4rem;
  background: #fff;
}

.docs-sidebar .docs-product-mark p,
.docs-sidebar .docs-kicker {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.docs-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-sidebar a {
  display: block;
  border-radius: 0.4rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.84rem;
  line-height: 1.35;
  color: rgba(10, 14, 18, 0.72);
}

.docs-sidebar a:hover {
  background: rgba(201, 164, 106, 0.16);
  color: var(--accent-deep);
}

.docs-sidebar a.is-active,
.docs-sidebar a[aria-current="page"] {
  background: rgba(201, 164, 106, 0.22);
  color: var(--accent-deep);
  font-weight: 600;
}

.docs-article {
  min-width: 0;
  flex: 1;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid rgba(10, 14, 18, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

/* Doc article typography */
.doc-content {
  max-width: 52rem;
}

.doc-content h1,
.doc-content h2,
.doc-content h3 {
  font-family: var(--font-display);
  color: var(--ink) !important;
  font-weight: 560;
}

.doc-content p,
.doc-content div,
.doc-content ul,
.doc-content ol,
.doc-content li {
  color: rgba(10, 14, 18, 0.78) !important;
}

.doc-content a {
  color: var(--accent-deep) !important;
}

.doc-content a:hover {
  color: var(--ink) !important;
}

.doc-content th {
  background: rgba(239, 230, 216, 0.55) !important;
}

.doc-content th,
.doc-content td {
  border-color: rgba(10, 14, 18, 0.12) !important;
}

.doc-content code {
  background: rgba(10, 14, 18, 0.06) !important;
}

.doc-content .docscape-block,
.doc-content .card {
  border-color: rgba(10, 14, 18, 0.12) !important;
  background: rgba(255, 255, 255, 0.55) !important;
}

.doc-content .hero {
  border-color: rgba(201, 164, 106, 0.35) !important;
  background:
    radial-gradient(circle at 12% 18%, rgba(224, 186, 120, 0.35), transparent 18rem),
    linear-gradient(135deg, #141a22 0%, #1c2430 55%, #2a2418 100%) !important;
  box-shadow: 0 16px 34px rgba(10, 14, 18, 0.28) !important;
}

.doc-content .hero h2 {
  color: var(--sand) !important;
  font-weight: 560 !important;
}

.doc-content .hero p {
  color: var(--sand-mute) !important;
}

.doc-content .entry {
  border-color: rgba(10, 14, 18, 0.12) !important;
  background: linear-gradient(135deg, #fff 0%, var(--sand) 70%, #f8f4ec 100%) !important;
  box-shadow: 0 8px 18px rgba(10, 14, 18, 0.08) !important;
}

.doc-content .entry::before {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong)) !important;
}

.doc-content a.entry:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 14px 28px rgba(138, 107, 53, 0.16) !important;
}

.doc-content .entry h3 {
  color: var(--accent-deep) !important;
}

.doc-content .admonition {
  border-left-color: var(--accent) !important;
  background: rgba(201, 164, 106, 0.14) !important;
}

.doc-content .admonition > strong:first-child {
  color: var(--accent-deep) !important;
}

.doc-content img.doc-zoomable:focus {
  outline-color: var(--accent) !important;
}

/* Soften leftover Tailwind blues */
body.page-docs .text-blue-600,
body.page-docs .text-blue-700,
body.page-docs .text-blue-800,
body.page-docs .text-blue-900,
body.page-docs .hover\:text-blue-700:hover,
body.page-docs .hover\:text-blue-800:hover {
  color: var(--accent-deep) !important;
}

body.page-docs .bg-blue-50,
body.page-docs .hover\:bg-blue-50:hover,
body.page-docs .hover\:bg-blue-100:hover {
  background-color: rgba(201, 164, 106, 0.14) !important;
}

body.page-docs .border-blue-200,
body.page-docs .hover\:border-blue-200:hover,
body.page-docs .border-blue-600 {
  border-color: rgba(201, 164, 106, 0.45) !important;
}

body.page-docs .bg-blue-600,
body.page-docs .hover\:bg-blue-700:hover,
body.page-docs .bg-blue-700 {
  background-color: var(--accent) !important;
  color: var(--ink) !important;
}

body.page-docs .bg-purple-50,
body.page-docs .hover\:bg-purple-50:hover,
body.page-docs .bg-teal-50,
body.page-docs .hover\:bg-teal-50:hover {
  background-color: rgba(201, 164, 106, 0.14) !important;
}

body.page-docs .text-purple-700,
body.page-docs .text-purple-800,
body.page-docs .text-teal-700,
body.page-docs .hover\:text-purple-700:hover,
body.page-docs .hover\:text-teal-700:hover {
  color: var(--accent-deep) !important;
}

body.page-docs .border-purple-200,
body.page-docs .border-teal-200,
body.page-docs .hover\:border-purple-200:hover,
body.page-docs .hover\:border-teal-200:hover {
  border-color: rgba(201, 164, 106, 0.45) !important;
}

/* Hide legacy sticky white header if a page still has both */
body.page-docs > header.sticky {
  display: none !important;
}

/* Apps / use-case catalog cards — solid left accent bar
   Parent overflow + rounded corners clip the bar; do not round the bar itself
   (large radius on a 6–8px strip collapses it to nearly invisible). */
a.catalog-card,
.catalog-card {
  position: relative !important;
  overflow: hidden !important;
  padding-left: 1.75rem !important;
}

a.catalog-card::before,
.catalog-card::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #8a6b35 !important;
  pointer-events: none !important;
  z-index: 2 !important;
  display: block !important;
}

a.catalog-card--accent::before,
.catalog-card--accent::before {
  background: #8a6b35 !important;
}

a.catalog-card--accent:hover,
.catalog-card--accent:hover {
  border-color: rgba(201, 164, 106, 0.55) !important;
}

a.catalog-card--accent .catalog-card__meta,
.catalog-card--accent .catalog-card__meta {
  color: #8a6b35 !important;
}

a.catalog-card--ink::before,
.catalog-card--ink::before {
  background: #0a0e12 !important;
}

a.catalog-card--ink:hover,
.catalog-card--ink:hover {
  border-color: rgba(10, 14, 18, 0.35) !important;
}

a.catalog-card--ink .catalog-card__meta,
.catalog-card--ink .catalog-card__meta {
  color: #0a0e12 !important;
}
