/* Live showcase components mounted by /js/showcase.js (real Libraries.dev components and the
   motion hero). Sizes are relative to the container so the same hero reads inside a small
   browser frame in the chat preview and in a wide stack tile. */

[data-showcase] { position: relative; min-height: 120px; }
[data-showcase]:not([data-showcase-mounted]) { background: linear-gradient(90deg, rgba(128,128,128,.05) 0%, rgba(128,128,128,.13) 50%, rgba(128,128,128,.05) 100%); background-size: 200% 100%; animation: pbShimmer 1.1s linear infinite; border-radius: 10px; }

/* ---- motion hero ---- */
.sc-hero { --acc: #ff5a00; position: relative; container-type: inline-size; aspect-ratio: 16 / 10; min-height: 200px; overflow: hidden; background: #050505 center / cover no-repeat; color: #fff; font-family: var(--font-sans); border-radius: inherit; isolation: isolate; }
.sc-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.sc-hero.playing .sc-hero-video { opacity: .92; }
.sc-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .05) 35%, rgba(0, 0, 0, .55) 100%); }
.sc-hero-nav { position: absolute; left: 4cqw; right: 4cqw; top: 3.5cqw; display: flex; align-items: center; gap: 3cqw; font-size: max(9px, 1.9cqw); }
.sc-hero-brand { display: inline-flex; align-items: center; gap: .6em; font-weight: 700; letter-spacing: -0.01em; }
.sc-hero-brand i { width: 1.1em; height: 1.1em; border-radius: 30%; background: var(--acc); }
.sc-hero-links { flex: 1; display: flex; justify-content: center; gap: 2.4cqw; padding: .55em 1.2em; border-radius: 999px; background: rgba(255, 255, 255, .09); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .85); }
.sc-hero-pill { padding: .55em 1.2em; border-radius: 999px; background: #fff; color: #111; font-weight: 600; }
.sc-hero-body { position: absolute; left: 6cqw; right: 6cqw; top: 17cqw; display: flex; flex-direction: column; align-items: center; text-align: center; }
.sc-hero-eyebrow { font-family: var(--font-mono); font-size: max(8px, 1.7cqw); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); margin-bottom: 1.4cqw; opacity: 0; transform: translateY(6px); transition: opacity .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1); }
.sc-hero-h1 { margin: 0; font-size: max(16px, 6.2cqw); line-height: 1.12; letter-spacing: -0.035em; font-weight: 600; max-width: 20ch; text-wrap: balance; }
.sc-hero-h1 span { display: inline-block; opacity: 0; transform: translateY(.45em) rotate(1.5deg); filter: blur(6px); transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1), filter .7s ease; }
.sc-hero-sub { margin: 3cqw 0 0; max-width: 46ch; font-size: max(9px, 2cqw); line-height: 1.5; color: rgba(255, 255, 255, .78); opacity: 0; transform: translateY(8px); transition: opacity .7s ease .55s, transform .7s cubic-bezier(.22, 1, .36, 1) .55s; }
.sc-hero-cta { display: flex; gap: 1.6cqw; margin-top: 3.4cqw; opacity: 0; transform: translateY(10px); transition: opacity .7s ease .75s, transform .7s cubic-bezier(.22, 1, .36, 1) .75s; }
.sc-hero-btn { display: inline-flex; align-items: center; padding: .75em 1.6em; border-radius: 999px; background: #fff; color: #111; font-size: max(9px, 2cqw); font-weight: 600; white-space: nowrap; transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.sc-hero-btn.ghost { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(8px); }
.sc-hero:hover .sc-hero-btn { transform: translateY(-2px); }
.sc-hero-stats { display: flex; gap: 5cqw; margin-top: 3cqw; opacity: 0; transition: opacity .8s ease 1s; }
.sc-hero-stats div { display: flex; flex-direction: column; align-items: center; }
.sc-hero-stats b { font-size: max(14px, 4cqw); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.sc-hero-stats small { font-size: max(8px, 1.6cqw); color: rgba(255, 255, 255, .65); }
.sc-hero-scroll { position: absolute; left: 50%; bottom: 3cqw; width: 1.6cqw; height: 3.6cqw; min-width: 8px; min-height: 16px; margin-left: -.8cqw; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .4); }
.sc-hero-scroll i { position: absolute; left: 50%; top: 22%; width: 2px; height: 22%; margin-left: -1px; border-radius: 2px; background: #fff; animation: scScroll 1.8s ease-in-out infinite; }
@keyframes scScroll { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(120%); opacity: 0; } }
.sc-hero.in .sc-hero-eyebrow, .sc-hero.in .sc-hero-sub, .sc-hero.in .sc-hero-cta, .sc-hero.in .sc-hero-stats { opacity: 1; transform: none; }
.sc-hero.in .sc-hero-h1 span { opacity: 1; transform: none; filter: blur(0); }

/* narrow frames (the chat preview on a phone): drop the link pill, smaller minimums, wrapping numbers */
@container (max-width: 340px) {
  .sc-hero { aspect-ratio: 16 / 14.5; }
  .sc-hero-links, .sc-hero-pill { display: none; }
  .sc-hero-body { top: 15cqw; }
  .sc-hero-h1 { font-size: max(14px, 6.4cqw); }
  .sc-hero-sub { font-size: max(8px, 2.1cqw); }
  .sc-hero-btn { font-size: max(8px, 2.2cqw); padding: .6em 1.1em; }
  .sc-hero-stats { flex-wrap: wrap; justify-content: center; gap: 2cqw 7cqw; }
  .sc-hero-stats b { font-size: max(12px, 4.4cqw); }
  .sc-hero-stats small { font-size: max(7px, 1.8cqw); }
}

/* ---- border beam demo ---- */
.sc-beam { display: flex; flex-direction: column; gap: 12px; align-items: stretch; justify-content: center; height: 100%; padding: 12px; }
.sc-beam-card { position: relative; padding: 14px 16px; border-radius: 14px; background: #121212; color: #fff; border: 1px solid #2a2a2a; }
.sc-beam-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; }
.sc-beam-top em { font-style: normal; font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: #ffb38a; background: rgba(255, 90, 0, .16); border-radius: 5px; padding: 2px 6px; }
.sc-beam-card b { display: block; margin: 8px 0 4px; font-size: 24px; letter-spacing: -0.03em; }
.sc-beam-card b small { font-size: 11px; color: #9a9a9a; margin-left: 2px; }
.sc-beam-card p { margin: 0 0 10px; font-size: 11px; line-height: 1.45; color: #b4b4b4; }
.sc-beam-btn { display: inline-block; padding: 6px 12px; border-radius: 8px; background: #fff; color: #111; font-size: 11px; font-weight: 600; }
.sc-beam-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.sc-beam-search i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #999; position: relative; }
.sc-beam-search i::after { content: ''; position: absolute; right: -5px; bottom: -4px; width: 5px; height: 2px; background: #999; transform: rotate(45deg); }

/* ---- gooey demo ---- */
.sc-goo { display: grid; place-items: center; height: 100%; min-height: 150px; padding-top: 34px; }
.sc-goo-dot, .sc-goo-main { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #ff5a00; color: #fff; font-weight: 600; font-size: 16px; }
.sc-goo-main { width: 48px; height: 48px; font-size: 22px; }

/* ---- metal demo ---- */
.sc-metal { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; height: 100%; min-height: 150px; background: #0d0d0e; border-radius: 10px; }
.sc-metal-btn { padding: 10px 22px; border-radius: 999px; border: 0; background: #1a1a1c; color: #fff; font: 600 13px var(--font-sans); cursor: default; }
.sc-metal-row { display: flex; align-items: center; gap: 16px; }
.sc-metal-circle { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #1a1a1c; color: #fff; font: 600 15px var(--font-sans); cursor: default; }
.sc-metal-badge { padding: 4px 10px; border-radius: 999px; background: #fff; color: #111; font: 600 11px var(--font-sans); }

/* ---- orbs demo ---- */
.sc-orbs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; min-height: 150px; }
.sc-orbs-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.sc-orbs-small { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* the preview's browser frame holds the live hero as its page */
.pb-site .pb-live-hero { border-bottom: 1px solid var(--sl); }
.pb-site .pb-live-hero .sc-hero { border-radius: 0; }

/* a live component inside a reply */
.pb-component { padding: 0; }
.pb-component .pb-comp-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.pb-component .pb-comp-head b { font-size: 12px; color: var(--ink); }
.pb-component .pb-comp-head span { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pb-component [data-showcase] { min-height: 170px; border-radius: 0 0 12px 12px; }
.pb-component .cap { padding: 8px 12px 10px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  .sc-hero-scroll i, [data-showcase]:not([data-showcase-mounted]) { animation: none; }
  .sc-hero-h1 span, .sc-hero-eyebrow, .sc-hero-sub, .sc-hero-cta, .sc-hero-stats { transition: none; opacity: 1; transform: none; filter: none; }
}
