/* LumaFlow brand layer — shared by the product site and documentation. */
:root {
  --canvas: #f4f3f0;
  --paper: #fffefa;
  --ink: #343948;
  --ink-soft: #687080;
  --line: rgba(59, 66, 84, 0.14);
  --blue: #aec3d3;
  --blue-strong: #7e9fb8;
  --lavender: #c8c0dc;
  --brand-purple: #9288b7;
  --brand-night: #343a49;
  --shadow: 0 24px 70px rgba(47, 53, 70, 0.11);
  --shadow-soft: 0 10px 32px rgba(47, 53, 70, 0.08);
}

html { scroll-padding-top: 104px; }

body {
  background:
    radial-gradient(circle at 6% 4%, rgba(174, 195, 211, 0.3), transparent 28rem),
    radial-gradient(circle at 96% 8%, rgba(200, 192, 220, 0.32), transparent 31rem),
    linear-gradient(180deg, #f8f7f4 0, var(--canvas) 34rem);
  color: var(--ink);
}

::selection { background: rgba(146, 136, 183, 0.28); color: #292e3a; }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid rgba(126, 159, 184, 0.48);
  outline-offset: 3px;
  border-radius: 8px;
}

.site-header { padding: 10px 0; background: transparent; border: 0; }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(244, 243, 240, 0.74); border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: background .2s ease, border-color .2s ease;
}
.site-header.is-scrolled::before { background: rgba(248, 247, 244, 0.92); border-color: var(--line); }
.nav-wrap {
  min-height: 58px; padding: 7px 9px 7px 14px;
  border: 1px solid rgba(59, 66, 84, 0.1); border-radius: 18px;
  background: rgba(255, 254, 250, 0.64); box-shadow: 0 8px 30px rgba(47, 53, 70, 0.06);
}
.brand { gap: 10px; font-weight: 760; letter-spacing: -.035em; }
.brand img { width: 36px; height: 36px; filter: drop-shadow(0 7px 9px rgba(56, 62, 79, .16)); }
.site-nav { gap: 3px; }
.site-nav > a:not(.nav-cta), .language-switch {
  position: relative; padding: 10px 12px; border-radius: 11px; color: var(--ink-soft);
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.site-nav > a:not(.nav-cta):hover, .site-nav > a.is-current, .site-nav > a[aria-current="page"] {
  color: var(--ink); background: rgba(174, 195, 211, .22);
}
.site-nav > a.is-current::after, .site-nav > a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--blue-strong), var(--brand-purple));
}
.nav-cta, .button-primary {
  border: 0; border-radius: 12px; color: #fff !important;
  background: linear-gradient(135deg, #3b4253 0%, #596276 58%, #8178a3 135%);
  box-shadow: 0 10px 24px rgba(52, 58, 73, .18), inset 0 1px rgba(255,255,255,.16);
}
.nav-cta:hover, .button-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(52,58,73,.24); }
.language-switch { min-width: 44px; border-color: rgba(59,66,84,.14); background: rgba(255,255,255,.58); }

.hero { position: relative; overflow: clip; }
.hero::before {
  content: ""; position: absolute; width: 38rem; height: 38rem; right: -18rem; top: -15rem;
  border: 1px solid rgba(146,136,183,.18); border-radius: 50%; box-shadow: 0 0 0 7rem rgba(174,195,211,.055);
}
.hero h1, .docs-hero h1 { letter-spacing: -.062em; text-wrap: balance; }
.hero h1 em { color: #77719a; text-shadow: 0 7px 30px rgba(146,136,183,.16); }
.eyebrow span:first-child { background: linear-gradient(135deg, var(--blue-strong), var(--brand-purple)); box-shadow: 0 0 0 5px rgba(174,195,211,.14); }
.eyebrow span:not(:first-child) { width: auto; height: auto; background: none; box-shadow: none; }
.button { min-height: 48px; padding-inline: 20px; border-radius: 13px; }
.text-link { text-underline-offset: 5px; }
.status { width: fit-content; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,254,250,.6); }
.status span { box-shadow: 0 0 0 5px rgba(126,159,184,.12); }

.hero-mark { min-height: 500px; isolation: isolate; }
.hero-mark::before, .hero-mark::after { content: ""; position: absolute; border-radius: 999px; filter: blur(2px); z-index: -1; }
.hero-mark::before { width: 58%; height: 58%; right: 4%; top: 6%; background: rgba(200,192,220,.5); }
.hero-mark::after { width: 52%; height: 52%; left: 5%; bottom: 4%; background: rgba(174,195,211,.52); }
.mark-field {
  border-radius: 34px; border: 1px solid rgba(255,255,255,.7);
  background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(239,239,244,.48));
  box-shadow: 0 32px 80px rgba(52,58,73,.14), inset 0 1px rgba(255,255,255,.9);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.hero-mark img { filter: drop-shadow(0 28px 25px rgba(54,60,76,.2)); }
.mark-caption { border-radius: 13px; background: rgba(255,254,250,.82); backdrop-filter: blur(12px); }

.principle-grid > *, .feature-grid > *, .docs-grid > *, .architecture-grid > *, .workflow-grid > *, .reference-card, .api-card {
  border-color: var(--line); border-radius: 20px; background: rgba(255,254,250,.72); box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.principle-grid > *:hover, .feature-grid > *:hover, .docs-grid > *:hover, .reference-card:hover, .api-card:hover {
  transform: translateY(-3px); border-color: rgba(126,159,184,.34); box-shadow: 0 18px 42px rgba(47,53,70,.11);
}
.code-panel, .docs-code {
  overflow: hidden; border: 1px solid rgba(200,192,220,.22); border-radius: 20px;
  background: linear-gradient(145deg, #343a49, #2d3240); box-shadow: 0 25px 60px rgba(37,42,54,.2);
}
.code-top, .docs-code > div { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.08); }
.copy-code { border-radius: 8px; transition: color .18s ease, background .18s ease; }
.copy-code:hover { color: #fff; background: rgba(174,195,211,.12); }

.docs-hero { position: relative; overflow: clip; border-bottom-color: var(--line); }
.docs-hero::after {
  content: ""; position: absolute; width: 26rem; height: 26rem; right: -10rem; bottom: -18rem;
  border-radius: 50%; background: rgba(200,192,220,.24); filter: blur(8px); pointer-events: none;
}
.docs-hero-inner > div:first-child { position: relative; z-index: 1; }
.locale-card, .api-toolbar {
  border-color: var(--line); border-radius: 18px; background: rgba(255,254,250,.76);
  box-shadow: var(--shadow-soft); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.language-button, .api-filter { border-radius: 10px; }
.docs-layout { gap: clamp(34px, 5vw, 76px); }
.docs-sidebar {
  top: 104px; padding: 18px; max-height: calc(100vh - 126px); overflow: auto;
  border: 1px solid var(--line); border-radius: 18px; background: rgba(255,254,250,.66);
  box-shadow: var(--shadow-soft); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.docs-sidebar nav a { margin: 2px 0; padding: 8px 10px; border-left: 0; border-radius: 9px; }
.docs-sidebar nav a:hover, .docs-sidebar nav a.is-active { color: var(--ink); background: rgba(174,195,211,.22); }
.docs-sidebar nav a.is-active { box-shadow: inset 3px 0 var(--brand-purple); }
.docs-content > section { scroll-margin-top: 112px; }
.docs-content > section + section { border-top-color: var(--line); }
.docs-callout { border: 1px solid rgba(126,159,184,.22); border-left: 4px solid var(--blue-strong); border-radius: 14px; background: rgba(174,195,211,.12); }
.docs-callout.cool { border-left-color: var(--brand-purple); background: rgba(200,192,220,.13); }
.docs-route-links { gap: 14px !important; border: 0 !important; background: transparent !important; }
.docs-route-links a {
  overflow: hidden; position: relative; border-color: var(--line) !important; border-radius: 18px;
  background: rgba(255,254,250,.76) !important; box-shadow: var(--shadow-soft) !important;
}
.docs-route-links a::after { content: "→"; position: absolute; right: 16px; top: 14px; color: var(--brand-purple); font-size: 18px; transition: transform .18s ease; }
.docs-route-links a:hover { transform: translateY(-4px) !important; box-shadow: 0 20px 44px rgba(47,53,70,.12) !important; }
.docs-route-links a:hover::after { transform: translateX(3px); }
.docs-route-links span { color: var(--brand-purple) !important; }

.api-search-wrap { border-radius: 12px; background: rgba(255,255,255,.68); }
.api-type-count { border-radius: 999px; background: rgba(200,192,220,.24); color: #676080; }
.reference-table { overflow: hidden; border-radius: 16px; box-shadow: var(--shadow-soft); }

.site-footer { border-top-color: var(--line); background: rgba(255,254,250,.42); }
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 20; display: grid; place-items: center;
  width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.34); border-radius: 14px;
  color: #fff; background: linear-gradient(145deg, #4b5365, #78709a); box-shadow: 0 14px 32px rgba(52,58,73,.24);
  opacity: 0; visibility: hidden; transform: translateY(10px); cursor: pointer;
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }

@media (max-width: 900px) {
  .nav-wrap { position: relative; }
  .site-nav {
    top: calc(100% + 9px); left: 0; right: 0; padding: 10px; border: 1px solid var(--line); border-radius: 16px;
    background: rgba(250,249,246,.97); box-shadow: 0 22px 50px rgba(47,53,70,.16); backdrop-filter: blur(18px);
  }
  .site-nav > a:not(.nav-cta), .language-switch { width: 100%; text-align: left; }
  .site-nav > a.is-current::after, .site-nav > a[aria-current="page"]::after { top: 8px; bottom: 8px; left: 4px; right: auto; width: 3px; height: auto; }
  .hero-mark { min-height: 390px; }
  .docs-sidebar { max-height: none; padding: 14px; }
}

@media (max-width: 620px) {
  .site-header { padding: 7px 0; }
  .nav-wrap { min-height: 54px; border-radius: 15px; }
  .hero { padding-top: 48px; }
  .hero-mark { min-height: 320px; }
  .mark-field { border-radius: 25px; }
  .actions .button { width: 100%; justify-content: center; }
  .back-to-top { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Shared documentation interaction contract. */
:where(a, button, input, select, summary):focus-visible {
  outline: 3px solid #7f75a7; outline-offset: 3px; border-radius: 8px;
}
.site-nav a { min-height: 42px; display: inline-flex; align-items: center; }
.docs-language { justify-content: center; min-width: 44px; }
.docs-content { min-width: 0; }
.docs-content code, .docs-start-card code { overflow-wrap: anywhere; }
.docs-code pre { scrollbar-color: #7f8998 #303542; }
.docs-code pre:focus-visible { outline-offset: -4px; }
.copy-code { min-width: 70px; min-height: 32px; }
.docs-callout strong { display: block; line-height: 1.35; }
.docs-sidebar nav a { min-height: 38px; display: flex; align-items: center; }
.reference-table > div { align-items: start; }

@media (max-width: 900px) {
  .site-nav a { min-height: 46px; padding-inline: 12px; border-radius: 9px; }
  .docs-sidebar nav { display: flex !important; overflow-x: auto; gap: 6px; padding: 5px 0 10px; border: 0; scrollbar-width: thin; }
  .docs-sidebar nav a { flex: 0 0 auto; min-height: 40px; padding: 8px 12px !important; border: 1px solid var(--line); border-radius: 999px; }
  .docs-sidebar nav a.is-active { box-shadow: inset 0 -3px var(--brand-purple); }
}

@media (max-width: 520px) {
  .docs-hero { padding-top: 3rem; }
  .docs-hero h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .docs-layout { padding-top: 2rem; }
  .docs-code { margin-inline: calc(var(--gutter) * -.35); border-radius: 14px; }
  .docs-code pre { font-size: .7rem; line-height: 1.65; }
  .locale-card { max-width: none; }
}
