/* cosprite landing page. Same system as openviewport.com: graphite stage, giant Unbounded
   wordmark behind the product, Michroma labels, Inter body, blue glass. The sample's neon
   magenta is the one accent that belongs to cosprite. */

@font-face { font-family: 'Michroma'; src: url('fonts/michroma-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Unbounded Variable'; src: url('fonts/unbounded-latin-wght-normal.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Inter Variable'; src: url('fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0c0c0e;
  --bg-2: #111114;
  --surface: #17171a;
  --surface-raised: #222226;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --ink: #f2f2f7;
  --muted: #a1a1aa;
  --dim: #6e6e78;
  --blue: #1f7bff;
  --tint: #64afff;
  --neon: #e05cff;
  --font: 'Inter Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Michroma', 'Inter Variable', sans-serif;
  --heavy: 'Unbounded Variable', 'Inter Variable', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --margin: clamp(1rem, 3vw, 2.75rem);
  --header: 72px;
  --container: 1320px;
  --gutter: max(var(--margin), calc((100% - var(--container)) / 2));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; scroll-padding-top: var(--header); color-scheme: dark; }
body { margin: 0; background: var(--bg); overflow-x: clip; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
code { font: 0.92em var(--mono); padding: 0.1em 0.35em; border-radius: 5px; background: rgba(255, 255, 255, 0.08); }
.mono { font-family: var(--mono); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 14px; border-radius: 8px; background: var(--blue); color: #fff; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 3px; }

/* Buttons ------------------------------------------------------------------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px; background: rgba(255, 255, 255, 0.07); color: var(--ink); font-size: 15px; font-weight: 560; white-space: nowrap; text-decoration: none; cursor: pointer; transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.3s; }
.button:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.12); }
.button.primary { border-color: rgba(255, 255, 255, 0.16); background: linear-gradient(180deg, #2f86ff, var(--blue)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 30px -8px rgba(31, 123, 255, 0.3); }
.button.primary:hover { background: linear-gradient(180deg, #4596ff, #2a84ff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 14px 38px -8px rgba(31, 123, 255, 0.4); }
.button.header-cta { min-height: 38px; padding: 0 16px; font-size: 14px; }
.text-action { background: none; border: 0; color: #d4d4dc; text-decoration: underline; text-underline-offset: 0.25em; cursor: pointer; padding: 6px 0; font-size: 14px; white-space: nowrap; }
.text-action:hover { color: #fff; }

/* Header -------------------------------------------------------------------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--gutter); transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s; }
.site-header.scrolled { background: rgba(12, 12, 14, 0.72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.nav-side { display: flex; align-items: center; gap: clamp(18px, 3.4vw, 56px); }
.nav-right { justify-content: flex-end; }
.nav-link { color: #b4b4bd; text-decoration: none; font-size: 15px; transition: color 0.2s; }
.nav-link:hover { color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; image-rendering: pixelated; filter: drop-shadow(0 4px 14px rgba(217, 119, 87, 0.35)); }
.brand-word { font-family: var(--display); font-size: 17px; letter-spacing: 0.02em; color: #fff; }

/* Hero ---------------------------------------------------------------------- */
.hero { position: relative; min-height: max(680px, min(100svh, 1000px)); padding: calc(var(--header) + 4px) 0 28px; display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(46% 42% at 50% 58%, rgba(170, 70, 255, 0.16), transparent 72%),
    radial-gradient(40% 36% at 50% 56%, rgba(48, 110, 255, 0.18), transparent 72%),
    radial-gradient(70% 50% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 70%),
    linear-gradient(180deg, #141418 0%, #0f0f12 60%, var(--bg) 100%); }
.pixel-rain { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.7;
  background-image:
    radial-gradient(1px 10px at 50% 50%, rgba(150, 165, 255, 0.55), transparent),
    radial-gradient(1px 7px at 50% 50%, rgba(224, 92, 255, 0.4), transparent);
  background-size: 67px 89px, 41px 61px; background-position: 0 0, 20px 30px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 35%, #000, transparent); mask-image: radial-gradient(70% 70% at 50% 35%, #000, transparent);
  animation: rain 0.9s linear infinite; }
@keyframes rain { to { background-position: -14px 89px, 10px 91px; } }

.hero-grid { position: relative; width: 100%; max-width: calc(var(--container) + 2 * var(--margin)); margin: 0 auto; padding: 0 var(--margin); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.7fr) minmax(0, 1fr); column-gap: clamp(24px, 2.6vw, 44px); --word: min(10.4vw, 166px); }
.hero-word { grid-column: 1 / -1; grid-row: 1; margin-top: clamp(8px, 2.4vh, 26px); text-align: center; font-family: var(--heavy); font-weight: 800; font-size: var(--word); line-height: 0.9; letter-spacing: -0.02em; color: #e9e9ef; opacity: 0.94; animation: rise 1.2s var(--ease) both; }
.hero-window { position: relative; grid-column: 2; grid-row: 2; z-index: 2; margin: calc(var(--word) * -0.2) 0 0; animation: windowIn 1.4s 0.15s var(--ease) both; }
.hero-window::before { content: ''; position: absolute; inset: -10% -6% -14%; z-index: -1; background: radial-gradient(closest-side, rgba(150, 80, 255, 0.22), transparent); filter: blur(30px); }
.editor { position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1); background: #0b0b0d; }
.editor-shot { width: 100%; height: auto; }
/* the clip sits on the canvas area of the screenshot, like the demo video */
.editor-clip { position: absolute; left: 11.1%; top: 7.6%; width: 77.8%; aspect-ratio: 16 / 9; border-radius: 1.2%/2.1%; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.12); background: #000; }
.editor-clip video { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-sound { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; background: rgba(12, 12, 14, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font-size: 12px; font-weight: 560; cursor: pointer; }
.clip-sound .wave { display: none; }
.clip-sound[aria-pressed='true'] .wave { display: inline; }
.clip-sound[aria-pressed='true'] .mute { display: none; }
.window-caption { margin-top: 12px; text-align: center; font-size: 12px; color: #8a8a94; }

.hero-left, .hero-right { grid-row: 2; z-index: 2; align-self: center; padding-top: calc(var(--word) * 0.1); }
.hero-left { grid-column: 1; }
.hero-right { grid-column: 3; text-align: right; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 2.4vw, 38px); line-height: 1.22; letter-spacing: 0.01em; text-transform: uppercase; }
.hero h1 .line { display: block; animation: rise 1s var(--ease) both; }
.hero h1 .line:nth-child(2) { animation-delay: 0.08s; }
.hero h1 .line:nth-child(3) { animation-delay: 0.16s; color: var(--neon); text-shadow: 0 0 24px rgba(224, 92, 255, 0.45); }
.label { margin: 32px 0 14px; font-family: var(--display); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.works { display: flex; flex-wrap: wrap; gap: 18px 22px; }
.works span { display: grid; justify-items: center; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 560; }
.works img, .works svg { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.works .gem { color: #8ab4ff; padding: 3px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }
.cta.center { justify-content: center; }
.hero-sub { font-size: clamp(19px, 1.6vw, 25px); line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; color: #fff; text-wrap: balance; }
.hero-sub span { color: #8a8a94; }
.hero-note { margin-top: 18px; font-size: 14px; line-height: 1.5; color: var(--muted); }

.hero-strip { position: relative; z-index: 2; margin-top: auto; border-top: 1px solid rgba(224, 92, 255, 0.35); box-shadow: 0 -1px 18px -4px rgba(224, 92, 255, 0.35); padding: 0 var(--margin); text-align: center; }
.hero-strip .label { margin: 16px 0 0; letter-spacing: 0.16em; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes windowIn { from { opacity: 0; transform: translateY(60px) scale(0.96); } }

/* Sections ------------------------------------------------------------------ */
section:not(.hero) { padding: clamp(90px, 12vw, 150px) 0 0; }
.section-head { max-width: 780px; margin: 0 auto; padding: 0 var(--margin); text-align: center; }
.eyebrow { display: block; margin-bottom: 16px; font-family: var(--display); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #8f9bb3; }
.section-head h2, .finale h2 { font-family: var(--heavy); font-size: clamp(30px, 4vw, 56px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; }
.section-head p:not(.eyebrow) { margin-top: 18px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* How ----------------------------------------------------------------------- */
.steps { max-width: var(--container); margin: 64px auto 0; padding: 0 var(--margin); display: grid; gap: clamp(56px, 8vw, 110px); }
.step { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.step:nth-child(even) .step-text { order: 2; }
.step-num { display: block; font-family: var(--display); font-size: 13px; color: var(--tint); margin-bottom: 14px; }
.step h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 650; letter-spacing: -0.025em; line-height: 1.1; }
.step p { margin-top: 14px; font-size: 17px; line-height: 1.6; color: var(--muted); }
.step-visual { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9); background: var(--surface); }
.step-visual img { width: 100%; height: auto; }
.chat { position: relative; padding: clamp(22px, 3vw, 36px); display: grid; gap: 14px; background: linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(19, 19, 22, 0.95) 60%); min-height: 300px; align-content: center; }
.chat-tag { position: absolute; top: 14px; right: 16px; font-family: var(--display); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.bubble { max-width: 88%; padding: 14px 16px; border-radius: 14px; font-size: 15px; line-height: 1.5; }
.bubble.me { justify-self: end; background: #26262b; color: #fff; border-bottom-right-radius: 4px; }
.bubble.agent { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: #d6d6de; border-bottom-left-radius: 4px; }
.bubble .skill { display: inline-block; margin-right: 6px; padding: 2px 7px; border-radius: 6px; background: rgba(224, 92, 255, 0.16); color: #f0c6ff; font: 12px var(--mono); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12px; color: #b4b4bd; }

/* Sample -------------------------------------------------------------------- */
.bento { max-width: var(--container); margin: 56px auto 0; padding: 0 var(--margin); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; }
.tile.wide { grid-column: span 2; }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; flex: 1; }
.tile.wide img { aspect-ratio: auto; object-position: top; image-rendering: pixelated; }
.tile figcaption { padding: 14px 16px 16px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.tile figcaption b { display: block; color: #fff; font-size: 15px; margin-bottom: 2px; }
.tile.stats { grid-column: span 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px; gap: 8px; background: linear-gradient(170deg, rgba(224, 92, 255, 0.08), rgba(19, 19, 22, 0.95) 70%); }
.stats div { display: grid; align-content: center; justify-items: start; padding: 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.stats b { font-family: var(--heavy); font-size: clamp(30px, 3vw, 44px); font-weight: 700; letter-spacing: -0.03em; }
.stats span { font-size: 13px; color: var(--muted); }
.formats { max-width: 900px; margin: 44px auto 0; padding: 0 var(--margin); text-align: center; }
.formats .label { margin: 22px 0 8px; }
.format-list { color: #d4d4dc; font-size: 15px; line-height: 1.7; }

/* Install ------------------------------------------------------------------- */
.install-card { max-width: 860px; margin: 48px auto 0; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line-strong); border-radius: 22px; background: linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(19, 19, 22, 0.92) 60%); }
.install-card .tabs { margin-bottom: 16px; }
.term { position: relative; border-radius: 14px; background: #08080a; border: 1px solid var(--line); }
.term-bar { display: flex; gap: 6px; padding: 12px 14px 0; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a2a30; }
.term pre { margin: 0; padding: 14px 18px 20px; padding-right: 92px; overflow-x: auto; }
.term code { background: none; padding: 0; font-size: 14.5px; line-height: 1.6; color: #e6e6ee; white-space: pre-wrap; word-break: break-word; }
.copy { position: absolute; top: 10px; right: 10px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255, 255, 255, 0.07); color: #fff; font-size: 13px; font-weight: 560; cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, 0.13); }
.copy.done { background: var(--blue); border-color: transparent; }
.install-steps { margin: 22px 0 0; padding: 0 0 0 22px; display: grid; gap: 10px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.install-steps b { color: #fff; font-weight: 600; }
.install-card .cta { margin-top: 26px; }

/* FAQ ----------------------------------------------------------------------- */
.faq-list { max-width: 820px; margin: 44px auto 0; padding: 0 var(--margin); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; padding: 22px 36px 22px 0; position: relative; font-size: 18px; font-weight: 600; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-weight: 400; font-size: 22px; color: var(--muted); transition: transform 0.3s var(--ease); }
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list details p { padding: 0 0 22px; color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 70ch; }

/* Finale + footer ----------------------------------------------------------- */
.finale { padding-bottom: clamp(90px, 12vw, 140px) !important; }
.finale-inner { max-width: 820px; margin: 0 auto; padding: 0 var(--margin); text-align: center; display: grid; justify-items: center; gap: 10px; }
.finale canvas { width: 124px; height: 124px; image-rendering: pixelated; margin-bottom: 8px; }
.finale h2 { max-width: 16ch; }
.site-footer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding: 28px var(--gutter) 36px; border-top: 1px solid var(--line); }
.footer-note { color: var(--muted); font-size: 14px; }
.footer-note a { color: #d4d4dc; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-nav a { color: #d4d4dc; font-size: 14px; text-decoration: none; }
.footer-nav a:hover { color: #fff; }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); --word: 15vw; row-gap: 28px; }
  .hero-window { grid-column: 1; grid-row: 2; }
  .hero-left { grid-column: 1; grid-row: 3; text-align: center; padding: 0; }
  .hero-left .works, .hero-left .cta { justify-content: center; }
  .hero-right { grid-column: 1; grid-row: 4; text-align: center; padding: 0; }
  .step, .step:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .step:nth-child(even) .step-text { order: 0; }
  .bento { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .hide-sm { display: none; }
  .site-header { grid-template-columns: auto 1fr auto; gap: 12px; }
  .site-header .nav-side:first-child { display: none; }
  .site-header .brand { grid-column: 1; }
  .hero h1 .line { display: inline; }
  .hero h1 .line + .line::before { content: ' '; }
  .hero h1 { font-size: 22px; }
  .hero-grid { --word: 13.6vw; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile.wide, .tile.stats { grid-column: auto; }
  .tile.stats { grid-template-columns: 1fr 1fr; }
  .site-footer { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .term pre { padding-right: 18px; padding-top: 44px; }
  .clip-sound span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
