/* Landing navigation is an editorial menu, independent of form select menus. */
html body.landing-page { --landing-gutter:clamp(20px,3vw,56px); }
html body.landing-page .site-nav.wrap {
  display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  width:100%; max-width:none; min-height:88px; height:auto; margin:0;
  padding-inline:var(--landing-gutter); gap:20px;
}
html body.landing-page .site-nav .brand { justify-self:start; margin:0; }
html body.landing-page .site-nav .brand-icon { display:inline-flex; width:28px; height:28px; }
html body.landing-page .site-nav .nav-actions { justify-self:end; }
html body.landing-page .site-nav .nav-links {
  justify-self:center; display:flex; align-items:center; gap:6px;
  background:transparent; border:0; padding:0; border-radius:0;
}
html body.landing-page .nav-links>a,
html body.landing-page .nav-dropdown>summary {
  display:flex; align-items:center; justify-content:center; gap:10px;
  min-width:0; width:auto; min-height:40px; padding:10px 13px;
  font:500 13px/20px var(--sans); text-transform:none; letter-spacing:0;
  background:transparent; color:var(--muted); border-radius:8px;
  transform:none; transition:background-color .16s,color .16s;
}
html body.landing-page .nav-dropdown-panel {
  position:absolute; top:calc(100% + 10px); left:0; right:auto;
  width:292px; min-width:292px;
  max-width:calc(100vw - var(--landing-gutter) * 2);
  margin:0; padding:8px; border:1px solid var(--line-soft); border-radius:12px;
  background:var(--raised); box-shadow:0 16px 40px #0005,0 2px 8px #0003;
  animation:landing-menu-reveal .14s ease-out;
}
html body.landing-page .nav-dropdown:nth-of-type(2) .nav-dropdown-panel { left:auto; right:0; }
html body.landing-page .nav-dropdown-panel .dropdown-caption {
  display:block; padding:5px 10px 9px;
  font:600 9px/16px var(--sans); letter-spacing:.08em; color:var(--muted);
}
html body.landing-page .nav-dropdown-panel .dropdown-item {
  display:grid; grid-template-columns:30px minmax(0,1fr) 12px;
  align-items:center; gap:10px; min-width:0; min-height:58px;
  padding:10px; border-radius:8px; white-space:normal;
  color:var(--ink); line-height:1.45; transform:none;
  transition:background-color .16s,color .16s;
}
html body.landing-page .nav-dropdown-panel .dropdown-item strong {
  display:block; font:500 13px/18px var(--sans); color:var(--ink);
}
html body.landing-page .nav-dropdown-panel .dropdown-item small {
  display:block; margin-top:3px; font:400 11px/16px var(--sans); color:var(--muted);
}
html body.landing-page .nav-dropdown-panel .dropdown-icon {
  display:grid; place-items:center; width:30px; height:30px;
  border:0; border-radius:8px; background:var(--soft); color:var(--muted);
}
html body.landing-page .nav-dropdown-panel .dropdown-icon svg { display:block; flex:none; }
html body.landing-page .nav-dropdown-panel .dropdown-arrow {
  display:block; font-size:12px; line-height:18px; color:var(--muted); justify-self:end;
}
html body.landing-page .nav-dropdown-panel .dropdown-footer {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  margin:5px 2px 0; padding:10px 8px 3px; background:transparent;
  border-top:1px solid var(--line-soft); border-radius:0;
  color:var(--muted); font:400 10px/16px var(--sans);
}
html body.landing-page .nav-dropdown-panel .dropdown-footer code { font-size:10px; }
@media(hover:hover) {
  html body.landing-page .nav-links>a:hover,
  html body.landing-page .nav-dropdown>summary:hover,
  html body.landing-page .nav-dropdown-panel .dropdown-item:hover { background:var(--hover); color:var(--ink); }
}
html body.landing-page .nav-dropdown[open]>summary,
html body.landing-page .nav-links>a[aria-current=page] { background:var(--selected); color:var(--ink); }
@media(hover:hover) {
  html body.landing-page .nav-dropdown[open]>summary:hover,
  html body.landing-page .nav-links>a[aria-current=page]:hover { background:var(--selected); color:var(--ink); }
}

/* Full-width atmosphere; the central wash keeps text clear. Canvas work stays bounded. */
html body.landing-page .hero.hero-code.wrap {
  width:100%; max-width:none; margin-inline:0; padding-inline:var(--landing-gutter);
  isolation:isolate;
}
html body.landing-page .hero-code .code-atmosphere {
  inset:0 0 64px; opacity:1; z-index:0;
  background:radial-gradient(ellipse at 50% 48%,#4f8cff0c,transparent 74%);
}
html body.landing-page .hero-code .code-atmosphere:before { opacity:.14; }
html body.landing-page .hero-code .code-atmosphere:after {
  background:radial-gradient(ellipse 32% 46% at 50% 38%,var(--bg) 18%,transparent 100%);
}
html body.landing-page .hero-code .hero-content { position:relative; z-index:2; }
html body.landing-page .hero-code .hero-bottom {
  left:var(--landing-gutter); right:var(--landing-gutter);
}
html body.landing-page .hero-code .scene-controls {
  right:var(--landing-gutter); left:var(--landing-gutter); z-index:3;
}
@keyframes landing-menu-reveal { from { opacity:0; } to { opacity:1; } }

@media(min-width:761px) and (max-width:980px) {
  html body.landing-page .site-nav.wrap { grid-template-columns:1fr 1fr; padding-block:14px; row-gap:10px; }
  html body.landing-page .site-nav .brand { grid-column:1; grid-row:1; }
  html body.landing-page .site-nav .nav-actions { grid-column:2; grid-row:1; }
  html body.landing-page .site-nav .nav-links { grid-column:1 / -1; grid-row:2; }
}
@media(max-width:760px) {
  html body.landing-page { --landing-gutter:18px; }
  html body.landing-page .site-nav.wrap {
    grid-template-columns:minmax(0,1fr) auto auto; min-height:72px; gap:10px;
  }
  html body.landing-page .site-nav .brand { grid-column:1; grid-row:1; font-size:23px; }
  html body.landing-page .site-nav .public-menu-toggle { grid-column:2; grid-row:1; min-height:36px; padding:8px 10px; font-size:12px; }
  html body.landing-page .site-nav .nav-actions { grid-column:3; grid-row:1; }
  html body.landing-page .site-nav .nav-links {
    display:none; position:absolute; left:var(--landing-gutter); right:var(--landing-gutter);
    top:calc(100% + 8px); padding:8px; gap:4px; align-items:stretch; justify-self:stretch;
    background:var(--raised); border:1px solid var(--line-soft); border-radius:12px;
    max-height:calc(100dvh - 96px); overflow-y:auto; overscroll-behavior:contain;
    box-shadow:0 16px 40px #0005;
  }
  html body.landing-page .site-nav .nav-links.open { display:flex; }
  html body.landing-page .nav-links>a,
  html body.landing-page .nav-dropdown>summary { width:100%; justify-content:space-between; padding:10px 12px; }
  html body.landing-page .nav-dropdown-panel,
  html body.landing-page .nav-dropdown:nth-of-type(2) .nav-dropdown-panel {
    position:static; width:100%; min-width:0; max-width:none; margin:6px 0;
    padding:4px; background:var(--surface); border:0; box-shadow:none;
  }
  html body.landing-page .nav-dropdown-panel .dropdown-caption,
  html body.landing-page .nav-dropdown-panel .dropdown-footer { display:none; }
  html body.landing-page .nav-dropdown-panel .dropdown-item { min-height:54px; padding:9px 8px; }
}
@media(max-width:360px) {
  html body.landing-page { --landing-gutter:14px; }
  html body.landing-page .site-nav.wrap { gap:8px; }
  html body.landing-page .site-nav .brand { font-size:21px; }
  html body.landing-page .site-nav .brand-icon,
  html body.landing-page .site-nav .brand-icon img { width:24px; height:24px; }
  html body.landing-page .site-nav .nav-actions .button { padding:7px 9px; font-size:10px; }
}
@media(prefers-reduced-motion:reduce) {
  html body.landing-page .nav-dropdown-panel { animation:none; }
}

/* Shared sticky navigation and anchor clearance on home and public docs. */
html body.landing-page{--public-header-offset:112px}
html body.landing-page .site-nav.wrap{position:sticky;top:0;z-index:40;background:var(--bg)}
html body.landing-page .section[id],html body.landing-page .docs-section{scroll-margin-top:var(--public-header-offset)}
html body.documentation-page .docs-toc{top:var(--public-header-offset)}
@media(min-width:761px) and (max-width:980px){html body.landing-page{--public-header-offset:136px}}
@media(max-width:760px){html body.landing-page{--public-header-offset:96px}}
