/* SPDX-FileCopyrightText: 2026 gllm
 * SPDX-License-Identifier: MIT
 * Landing page for the build-free PUI contract.
 */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--lp-bg);
  color: var(--lp-text);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[id] { scroll-margin-top: 88px; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 72% -5%, rgba(110, 231, 255, .16), transparent 65%),
    radial-gradient(ellipse 50% 40% at 8% 24%, rgba(167, 139, 250, .12), transparent 70%),
    radial-gradient(ellipse 40% 35% at 55% 95%, rgba(94, 234, 212, .06), transparent 70%);
}
:root {
  --lp-bg: #070b12;
  --lp-bg-2: #0a111c;
  --lp-panel: rgba(14, 23, 38, .88);
  --lp-panel-2: #111c2e;
  --lp-text: #edf5ff;
  --lp-muted: #9aafc8;
  --lp-dim: #6f849c;
  --lp-border: rgba(156, 185, 220, .16);
  --lp-border-strong: rgba(156, 185, 220, .28);
  --lp-accent: #6ee7ff;
  --lp-accent-2: #a78bfa;
  --lp-grad-a: #6ee7ff;
  --lp-grad-b: #b9f3ff;
  --lp-grad-c: #a78bfa;
  --lp-good: #5eead4;
  --lp-warn: #fbbf24;
  --lp-radius: 14px;
  --lp-shadow: 0 24px 70px rgba(0, 0, 0, .38);
  --lp-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
html[data-theme="light"] {
  --lp-bg: #f4f7fb;
  --lp-bg-2: #eaf0f7;
  --lp-panel: rgba(255, 255, 255, .9);
  --lp-panel-2: #f2f6fb;
  --lp-text: #122034;
  --lp-muted: #53657b;
  --lp-dim: #71839a;
  --lp-border: rgba(38, 65, 96, .15);
  --lp-border-strong: rgba(38, 65, 96, .26);
  --lp-accent: #087ea4;
  --lp-accent-2: #5b3fc4;
  --lp-grad-a: #076b8c;
  --lp-grad-b: #0e7490;
  --lp-grad-c: #5b3fc4;
  --lp-good: #0f766e;
  --lp-warn: #a16207;
  --lp-shadow: 0 24px 60px rgba(36, 65, 98, .13);
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 60% 45% at 72% -5%, rgba(8, 126, 164, .13), transparent 65%),
    radial-gradient(ellipse 50% 40% at 8% 24%, rgba(109, 75, 216, .1), transparent 70%);
}
::selection { background: color-mix(in srgb, var(--lp-accent) 34%, transparent); }

a { color: inherit; }
code, pre, .mono { font-family: var(--lp-mono); }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 50; padding: 10px 14px; border-radius: 8px; background: var(--lp-accent); color: #041018; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  width: min(1240px, calc(100% - 48px));
  min-height: 72px; margin: 0 auto;
  border-bottom: 1px solid var(--lp-border);
  background: color-mix(in srgb, var(--lp-bg) 78%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
.brand, .footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--lp-text); text-decoration: none; font-weight: 650; letter-spacing: -.02em; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-2)); color: #06111c; font-weight: 850; font-size: 17px; box-shadow: 0 0 24px rgba(110, 231, 255, .2); }
.brand-word { font-size: 1.05rem; }
.brand-word span, .footer-brand span span { color: var(--lp-muted); font-weight: 450; }
.site-nav { display: flex; gap: 22px; margin-inline: auto; }
.site-nav a { color: var(--lp-muted); text-decoration: none; font-size: .86rem; font-weight: 550; }
.site-nav a:hover { color: var(--lp-text); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--lp-border); border-radius: 9px; background: transparent; color: var(--lp-muted); cursor: pointer; }
.icon-button:hover { color: var(--lp-text); border-color: var(--lp-border-strong); background: var(--lp-panel); }
.icon { width: 17px; height: 17px; }
.icon.moon { display: none; }
html[data-theme="light"] .icon.sun { display: none; }
html[data-theme="light"] .icon.moon { display: block; }
.header-cta { padding: 8px 13px; border: 1px solid var(--lp-border-strong); border-radius: 9px; color: var(--lp-text); text-decoration: none; font-size: .8rem; font-weight: 600; }
.header-cta:hover { border-color: var(--lp-accent); color: var(--lp-accent); }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(440px, .96fr);
  gap: clamp(32px, 5vw, 84px); align-items: center;
  width: min(1240px, calc(100% - 48px)); margin: 0 auto;
  padding: clamp(58px, 8vw, 112px) 0 clamp(64px, 9vw, 120px);
}
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--lp-muted); font-family: var(--lp-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lp-good); box-shadow: 0 0 0 4px rgba(94, 234, 212, .1), 0 0 16px var(--lp-good); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-size: clamp(2.65rem, 5.1vw, 4.65rem); line-height: 1.02; letter-spacing: -.055em; font-weight: 760; }
.gradient-text { color: transparent; background: linear-gradient(100deg, var(--lp-grad-a) 8%, var(--lp-grad-b) 42%, var(--lp-grad-c) 92%); -webkit-background-clip: text; background-clip: text; }
.lede { max-width: 42rem; margin-bottom: 30px; color: var(--lp-muted); font-size: clamp(1rem, 1.35vw, 1.16rem); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-size: .86rem; font-weight: 650; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--lp-accent); color: #041018; box-shadow: 0 8px 28px rgba(110, 231, 255, .16); }
.button-primary:hover { background: #b9f3ff; }
.button-quiet { border-color: var(--lp-border-strong); color: var(--lp-text); background: rgba(255, 255, 255, .02); }
.button-quiet:hover { border-color: var(--lp-accent); color: var(--lp-accent); }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; max-width: 430px; margin: 0; padding: 0; border: 1px solid var(--lp-border); border-radius: 10px; overflow: hidden; background: var(--lp-border); }
.hero-stats div { padding: 12px 14px; background: color-mix(in srgb, var(--lp-bg) 72%, var(--lp-panel)); }
.hero-stats dt { color: var(--lp-text); font-family: var(--lp-mono); font-size: 1.28rem; line-height: 1; }
.hero-stats dd { margin: 6px 0 0; color: var(--lp-muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; }
.hero-note { margin: 16px 0 0; color: var(--lp-dim); font-size: .74rem; }

.hero-lab { position: relative; min-width: 0; border: 1px solid var(--lp-border-strong); border-radius: 16px; background: linear-gradient(180deg, rgba(19, 31, 49, .92), rgba(8, 14, 24, .96)); box-shadow: var(--lp-shadow); overflow: hidden; }
html[data-theme="light"] .hero-lab { background: #fff; }
.hero-lab::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
.lab-topbar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--lp-border); color: var(--lp-muted); font-family: var(--lp-mono); font-size: .64rem; letter-spacing: .08em; }
.window-dots { display: flex; gap: 5px; }
.window-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--lp-border-strong); }
.window-dots span:first-child { background: #ff7b72; }
.window-dots span:nth-child(2) { background: var(--lp-warn); }
.window-dots span:nth-child(3) { background: var(--lp-good); }
.lab-label { flex: 1 1 auto; }
.lab-host-action { border: 1px solid var(--lp-border); border-radius: 6px; background: transparent; color: var(--lp-muted); font: inherit; font-size: .64rem; cursor: pointer; padding: 5px 8px; }
.lab-host-action:hover { color: var(--lp-text); border-color: var(--lp-accent); }
.demo-mount { padding: 13px; }
.demo-mount .pui { padding: 0; background: transparent; border-radius: 0; font-size: 13px; }
.demo-mount .pui-panel { gap: 0; }
.demo-mount .pui-page { gap: 8px; }
.demo-mount .pui-section { padding: 9px 10px; border-radius: 8px; }
.demo-mount .pui-section h3 { font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; }
.demo-mount .pui-help { font-size: .68rem; }
.demo-mount .pui-field { grid-template-columns: 105px minmax(0, 1fr) auto; padding: 5px 0; }
.demo-mount .pui-caption { font-size: .72rem; }
.demo-mount .pui-field-help, .demo-mount .pui-status { margin-inline-start: 113px; }
.demo-mount .pui-actions { gap: 6px; }
.demo-mount .pui-button { font-size: .72rem; }
.demo-mount .pui-statusbar { padding: 5px 7px; border-radius: 6px; font-size: .66rem; }
.demo-mount .pui-statusbar-item::before { display: none; }
.demo-mount .pui-statusbar-value { font-size: .66rem; }
.demo-mount .pui-readout { font-size: .72rem; }
.plane-log { border-top: 1px solid var(--lp-border); background: rgba(5, 10, 18, .45); }
html[data-theme="light"] .plane-log { background: #f7faff; }
.plane-log-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; color: var(--lp-muted); font-family: var(--lp-mono); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; }
.live-dot { display: inline-block; width: 6px; height: 6px; margin-inline-end: 6px; border-radius: 50%; background: var(--lp-good); box-shadow: 0 0 0 3px rgba(94,234,212,.1); }
.link-button { border: 0; background: transparent; color: var(--lp-dim); font: inherit; font-size: .6rem; cursor: pointer; text-transform: uppercase; letter-spacing: .06em; }
.link-button:hover { color: var(--lp-accent); }
.event-log { display: flex; flex-direction: column; gap: 0; max-height: 128px; overflow: auto; margin: 0; padding: 0 14px 10px; list-style: none; }
.event-row { display: grid; grid-template-columns: 4.3rem 1.2rem minmax(0, 1fr); gap: 5px; padding: 5px 0; border-top: 1px solid rgba(156,185,220,.08); color: var(--lp-muted); font-family: var(--lp-mono); font-size: .62rem; line-height: 1.45; }
.event-row:first-child { border-top: 0; }
.event-time { color: var(--lp-dim); }
.event-dir { color: var(--lp-accent); }
.event-row.is-in .event-dir { color: var(--lp-good); }
.event-row.is-out .event-dir { color: var(--lp-accent-2); }
.event-row.is-action .event-dir { color: var(--lp-warn); }
.event-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-caption { margin: 0; padding: 0 14px 12px; color: var(--lp-dim); font-size: .65rem; }
.lab-caption span { color: var(--lp-accent); }

.section { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: clamp(58px, 8vw, 110px) 0; border-top: 1px solid var(--lp-border); }
.section-heading { max-width: 790px; margin-bottom: 38px; }
.section-heading .eyebrow { margin-bottom: 12px; }
h2 { margin-bottom: 14px; font-size: clamp(1.9rem, 3.5vw, 3.15rem); line-height: 1.08; letter-spacing: -.045em; font-weight: 730; }
.section-heading > p:last-child { max-width: 64ch; margin-bottom: 0; color: var(--lp-muted); font-size: 1.02rem; }
.language-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 32px; align-items: start; }
.code-card, .adapter-code { border: 1px solid var(--lp-border); border-radius: 12px; background: rgba(5, 10, 18, .66); overflow: hidden; box-shadow: 0 12px 38px rgba(0,0,0,.14); }
html[data-theme="light"] .code-card, html[data-theme="light"] .adapter-code { background: #0d1420; }
.code-bar { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid rgba(156,185,220,.12); color: #7188a2; font-family: var(--lp-mono); font-size: .64rem; letter-spacing: .04em; }
.code-block { margin: 0; padding: 20px; overflow: auto; color: #c8d8ec; font-family: var(--lp-mono); font-size: .78rem; line-height: 1.65; tab-size: 2; }
.code-foot { padding: 11px 14px; border-top: 1px solid rgba(156,185,220,.12); color: #7188a2; font-size: .68rem; }
.tok-k { color: #a78bfa; } .tok-s { color: #5eead4; } .tok-n { color: #fbbf24; } .tok-p { color: #8ea6c2; } .tok-f { color: #6ee7ff; }
.principle-list { display: grid; gap: 0; }
.principle { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--lp-border); }
.principle:first-child { padding-top: 0; }
.principle:last-child { border-bottom: 0; }
.principle-index { color: var(--lp-accent); font-family: var(--lp-mono); font-size: .72rem; }
.principle h3 { margin-bottom: 5px; font-size: 1rem; letter-spacing: -.015em; }
.principle p { margin: 0; color: var(--lp-muted); font-size: .86rem; }
.block-strip { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 32px; }
.block-strip span { padding: 6px 10px; border: 1px solid var(--lp-border); border-radius: 999px; color: var(--lp-muted); font-family: var(--lp-mono); font-size: .67rem; }
.block-strip span:nth-child(4n+1) { border-color: rgba(110,231,255,.28); color: var(--lp-accent); }

.plane-diagram { display: grid; grid-template-columns: minmax(0,1fr) 230px minmax(0,1fr); gap: 18px; align-items: stretch; }
.plane-node { padding: 24px; border: 1px solid var(--lp-border); border-radius: 12px; background: linear-gradient(180deg, rgba(17, 28, 46, .7), rgba(8, 14, 24, .5)); }
html[data-theme="light"] .plane-node { background: #fff; }
.node-kicker { color: var(--lp-accent); font-family: var(--lp-mono); font-size: .62rem; letter-spacing: .12em; }
.plane-node h3 { margin: 9px 0 7px; font-size: 1.15rem; }
.plane-node p { margin-bottom: 17px; color: var(--lp-muted); font-size: .84rem; }
.node-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.node-tags span { padding: 3px 7px; border: 1px solid var(--lp-border); border-radius: 5px; color: var(--lp-dim); font-family: var(--lp-mono); font-size: .6rem; }
.plane-bridge { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 16px; border: 1px dashed var(--lp-border-strong); border-radius: 12px; background: color-mix(in srgb, var(--lp-accent) 3%, transparent); }
.bridge-label { margin-bottom: 5px; color: var(--lp-accent-2); font-family: var(--lp-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.plane-bridge code { color: var(--lp-muted); font-family: var(--lp-mono); font-size: .63rem; }
.bridge-pulse { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--lp-accent); box-shadow: 0 0 24px 8px rgba(110,231,255,.2); transform: translate(-50%, -50%); animation: pulse 2.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: translate(-50%, -50%) scale(.7); } 50% { opacity: .9; transform: translate(-50%, -50%) scale(1.1); } }
.plane-notes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; margin: 28px 0; }
.plane-notes > div { padding: 16px; border-left: 1px solid var(--lp-border); }
.note-mark { color: var(--lp-accent); font-family: var(--lp-mono); font-size: 1rem; }
.plane-notes strong { margin-left: 7px; font-size: .82rem; }
.plane-notes p { margin: 5px 0 0 20px; color: var(--lp-muted); font-size: .78rem; }
.plane-notes code { color: var(--lp-accent); font-size: .73rem; }
.adapter-code { max-width: 690px; }

.surface-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.surface-card { display: flex; flex-direction: column; min-height: 245px; padding: 20px; border: 1px solid var(--lp-border); border-radius: 12px; background: linear-gradient(180deg, rgba(17,28,46,.6), rgba(8,14,24,.35)); color: inherit; text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
html[data-theme="light"] .surface-card { background: #fff; }
.surface-card:hover { transform: translateY(-3px); border-color: var(--lp-border-strong); }
.surface-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 20px; border: 1px solid var(--lp-border-strong); border-radius: 9px; color: var(--lp-accent); font-family: var(--lp-mono); font-weight: 700; }
.surface-state { color: var(--lp-dim); font-family: var(--lp-mono); font-size: .58rem; letter-spacing: .07em; text-transform: uppercase; }
.surface-card h3 { margin: 7px 0 8px; font-size: 1.05rem; }
.surface-card p { flex: 1 1 auto; margin-bottom: 16px; color: var(--lp-muted); font-size: .79rem; }
.surface-card code { color: var(--lp-accent); font-size: .73rem; }
.surface-link { color: var(--lp-accent); font-size: .72rem; font-weight: 600; }

.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; border: 1px solid var(--lp-border); border-radius: 12px; overflow: hidden; background: var(--lp-border); }
.why-card { padding: 22px; background: color-mix(in srgb, var(--lp-bg) 82%, var(--lp-panel)); }
.why-num { color: var(--lp-accent); font-family: var(--lp-mono); font-size: .62rem; }
.why-card h3 { margin: 11px 0 7px; font-size: .98rem; }
.why-card p { margin: 0; color: var(--lp-muted); font-size: .81rem; }

.cta { display: flex; align-items: end; justify-content: space-between; gap: 32px; width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: clamp(58px, 8vw, 104px) 0; border-top: 1px solid var(--lp-border); }
.cta h2 { margin-bottom: 12px; font-size: clamp(2rem, 4.2vw, 3.4rem); }
.cta p:not(.eyebrow) { max-width: 50ch; margin-bottom: 0; color: var(--lp-muted); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.site-footer { display: flex; align-items: center; gap: 24px; width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 26px 0 38px; border-top: 1px solid var(--lp-border); color: var(--lp-dim); font-size: .72rem; }
.site-footer p { margin: 0 auto 0 0; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--lp-muted); text-decoration: none; }
.footer-links a:hover { color: var(--lp-accent); }

@media (max-width: 1080px) {
  .site-nav { gap: 14px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr); gap: 38px; }
  .surface-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .site-header { width: calc(100% - 32px); gap: 12px; }
  .site-nav { display: none; }
  .header-actions { margin-inline-start: auto; }
  .hero { grid-template-columns: 1fr; width: calc(100% - 32px); padding-top: 52px; gap: 42px; }
  .section, .cta, .site-footer { width: calc(100% - 32px); }
  .hero-lab { max-width: 660px; }
  .language-grid { grid-template-columns: 1fr; }
  .plane-diagram { grid-template-columns: 1fr; }
  .plane-bridge { min-height: 145px; }
  .plane-notes { grid-template-columns: 1fr; gap: 0; }
  .plane-notes > div { border-left: 0; border-top: 1px solid var(--lp-border); }
  .why-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cta { display: block; }
  .cta-actions { justify-content: flex-start; margin-top: 26px; }
  .site-footer { flex-wrap: wrap; }
  .site-footer p { flex-basis: 100%; order: 3; margin: 0; }
}
@media (max-width: 560px) {
  .site-header { min-height: 64px; }
  .header-cta { display: none; }
  h1 { font-size: clamp(2.4rem, 12vw, 3.25rem); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-actions .button { width: 100%; justify-content: center; }
  .surface-grid, .why-grid { grid-template-columns: 1fr; }
  .demo-mount { padding: 10px; }
  .demo-mount .pui-field { grid-template-columns: 92px minmax(0, 1fr) auto; }
  .demo-mount .pui-field-help, .demo-mount .pui-status { margin-inline-start: 100px; }
  .event-log { max-height: 150px; }
  .lab-topbar { padding: 10px 11px; }
  .lab-host-action { font-size: .58rem; }
  .cta-actions .button { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
