:root {
  --bg: #131316;
  --bg-2: #18181c;
  --card: #1c1c21;
  --card-2: #222228;
  --line: #2b2b33;
  --line-2: #3a3a44;
  --text: #ededf0;
  --muted: #9a9aa8;
  --dim: #6c6c78;
  --amber: #f5b429;
  --coral: #ff6b4a;
  --violet: #8b7bff;
  --green: #4ade80;
  --grad: linear-gradient(95deg, #ffd27a 0%, #f5b429 35%, #ff6b4a 100%);
  --radius: 18px;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-family: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--amber); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(19, 19, 22, .78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 1.1rem; letter-spacing: -.01em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); display: grid; place-items: center; color: #1a1208; font-weight: 900; font-size: .95rem; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 8px; font-size: .92rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav .nav-cta { margin-left: 8px; background: var(--text); color: #131316; font-weight: 600; }
.nav .nav-cta:hover { background: #fff; color: #131316; }
@media (max-width: 640px) { .nav a { padding: 6px 8px; font-size: .85rem; } .nav .nav-cta { display: none; } }

/* Hero */
.hero { position: relative; padding: 96px 0 72px; text-align: center; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 640px; background: radial-gradient(closest-side, rgba(245, 180, 41, .16), transparent 70%), radial-gradient(closest-side at 70% 60%, rgba(255, 107, 74, .12), transparent 70%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; opacity: .25; mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%); pointer-events: none; }
.hero > .wrap { position: relative; z-index: 1; }
.hero.left { text-align: left; }
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 600; margin: 18px auto 20px; max-width: 900px; }
.hero.left h1 { margin-left: 0; }
.hero p.sub { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.hero.left p.sub { margin-left: 0; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cursor { display: inline-block; width: .5em; height: .09em; background: var(--coral); margin-left: .06em; vertical-align: baseline; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--muted); border-radius: 999px; padding: 5px 14px 5px 6px; font-size: .84rem; text-decoration: none; }
.pill b { background: rgba(245, 180, 41, .14); color: var(--amber); border-radius: 999px; padding: 2px 9px; font-weight: 600; font-size: .76rem; }
.pill:hover { border-color: var(--dim); color: var(--text); }

.label { font-family: var(--mono); text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; color: var(--muted); margin: 0 0 14px; }
.label.amber { color: var(--amber); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: .95rem; font-family: inherit; transition: background .15s, border-color .15s, transform .15s; }
.btn-primary { background: var(--grad); color: #1a1208; }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-ghost { background: rgba(255, 255, 255, .04); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn[aria-disabled="true"] { opacity: .6; cursor: default; transform: none; filter: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .actions { justify-content: center; }
.hero.left .actions { justify-content: flex-start; }

/* Sections */
section { padding: 72px 0; }
.sec-head { text-align: center; margin-bottom: 44px; }
.sec-head.left { text-align: left; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; margin: 0 0 14px; }
.lede { color: var(--muted); font-size: 1.08rem; max-width: 640px; margin: 0 auto; }
.sec-head.left .lede { margin: 0; }

/* Horizontal product showcase */
.showcase { display: grid; gap: 28px; }
.product-row { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.product-row.flip { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.product-row.flip .info { order: 2; }
.product-row .info { padding: 44px 40px; display: flex; flex-direction: column; gap: 14px; }
.product-row .info h3 { font-size: 2rem; letter-spacing: -.03em; margin: 0; font-weight: 600; line-height: 1.1; }
.product-row .info p { margin: 0; color: var(--muted); }
.product-row .info .actions { margin-top: auto; padding-top: 12px; }
.product-row .stage { position: relative; border-left: 1px solid var(--line); background: radial-gradient(circle at 60% 40%, rgba(245, 180, 41, .08), transparent 60%), #0f0f12; padding: 32px; display: grid; place-items: center; min-height: 420px; }
.product-row.flip .stage { border-left: 0; border-right: 1px solid var(--line); }
@media (max-width: 900px) {
  .product-row, .product-row.flip { grid-template-columns: 1fr; }
  .product-row.flip .info { order: 0; }
  .product-row .stage, .product-row.flip .stage { border: 0; border-top: 1px solid var(--line); min-height: 340px; padding: 20px; }
  .product-row .info { padding: 30px 24px; }
}
.app-id { display: flex; align-items: center; gap: 14px; }
.app-id img, .app-id .glyph { width: 48px; height: 48px; border-radius: 12px; background: #fff; padding: 4px; }
.app-id .glyph { display: grid; place-items: center; background: #f4ecd8; color: #1a1208; font-size: 1.6rem; padding: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.tag.live { color: var(--green); border-color: rgba(74, 222, 128, .3); background: rgba(74, 222, 128, .06); }
.tag.dev { color: var(--amber); border-color: rgba(245, 180, 41, .3); background: rgba(245, 180, 41, .06); }
.ticks { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; color: var(--text); font-size: .95rem; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border-left: 2px solid var(--amber); border-bottom: 2px solid var(--amber); transform: rotate(-45deg); }

/* Feature rows (product pages): text + demo side by side */
.feature-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; padding: 40px 0; }
.feature-row.flip .text { order: 2; }
.feature-row h3 { font-size: 1.9rem; letter-spacing: -.03em; font-weight: 600; margin: 0 0 12px; line-height: 1.15; }
.feature-row .text p { color: var(--muted); margin: 0 0 18px; }
.feature-row .stage { border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(circle at 50% 30%, rgba(245, 180, 41, .07), transparent 60%), #0f0f12; padding: 32px; display: grid; place-items: center; min-height: 400px; }
@media (max-width: 900px) { .feature-row { grid-template-columns: 1fr; gap: 24px; } .feature-row.flip .text { order: 0; } .feature-row .stage { padding: 18px; min-height: 320px; } }

/* Bento grid */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bento .cell { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.bento .cell.wide { grid-column: span 2; }
.bento .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(245, 180, 41, .1); border: 1px solid rgba(245, 180, 41, .2); font-size: 1.1rem; margin-bottom: 14px; }
.bento h4 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 600; }
.bento p { margin: 0; color: var(--muted); font-size: .94rem; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } .bento .cell.wide { grid-column: auto; } }

/* Horizontal strip (steps / gallery) */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.strip > * { scroll-snap-align: start; }
.strip img { border-radius: 14px; border: 1px solid var(--line); }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step .num { font-family: var(--mono); color: var(--amber); font-size: .8rem; }
.step h4 { margin: 8px 0 6px; font-size: 1.1rem; }
.step p { margin: 0; color: var(--muted); font-size: .94rem; }

/* CTA */
.cta { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; padding: 56px 40px; text-align: center; background: radial-gradient(ellipse at 50% 120%, rgba(255, 107, 74, .22), transparent 60%), radial-gradient(ellipse at 50% -20%, rgba(245, 180, 41, .14), transparent 60%), var(--card); }
.cta p { color: var(--muted); max-width: 520px; margin: 0 auto 26px; }
.cta .actions { justify-content: center; }

/* Forms */
.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .9rem; color: var(--muted); }
.form input, .form select, .form textarea { font: inherit; color: var(--text); padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 10px; background: #121215; width: 100%; }
.form textarea { min-height: 170px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid rgba(245, 180, 41, .5); border-color: var(--amber); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .row-2 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .84rem; color: var(--dim); margin: 0; }
.status { margin: 0; padding: 12px 14px; border-radius: 10px; display: none; }
.status.ok { display: block; background: rgba(74, 222, 128, .08); color: var(--green); border: 1px solid rgba(74, 222, 128, .25); }
.status.err { display: block; background: rgba(255, 107, 74, .08); color: #ff9a82; border: 1px solid rgba(255, 107, 74, .3); }
.support-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .support-grid { grid-template-columns: 1fr; } }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 500; cursor: pointer; }
.faq details[open] summary { color: var(--amber); }
.faq details p { margin: 10px 0 0; color: var(--muted); }

.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -.03em; line-height: 1.1; font-weight: 600; }
.prose h2 { margin-top: 36px; font-size: 1.3rem; letter-spacing: -.01em; }
.prose p { color: #c9c9d2; }

.art { border-radius: 22px; border: 1px solid var(--line); overflow: hidden; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 32px 0; font-size: .9rem; color: var(--dim); margin-top: 40px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.site-foot a { color: var(--muted); text-decoration: none; margin-left: 16px; }
.site-foot a:hover { color: var(--text); }

/* ───── Demo components ───── */
.demo { width: 100%; max-width: 560px; }
.win { background: #fbf8f2; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06); color: #1b1d3a; }
.win-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #ece7dd; border-bottom: 1px solid #ddd6c8; }
.win-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d1c9b9; }
.win-bar .url { flex: 1; margin-left: 8px; background: #fff; border-radius: 6px; padding: 3px 10px; font: 11px var(--mono); color: #6b6b7b; }
.win-bar .badge { font: 700 9px var(--mono); background: var(--amber); color: #1a1208; border-radius: 4px; padding: 2px 5px; }
.viewport { position: relative; height: 290px; overflow: hidden; }

/* mode tabs inside the home AutoScroller demo */
.mode-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); margin-bottom: 16px; }
.mode-tabs button { font: 500 .84rem inherit; font-family: inherit; color: var(--muted); background: transparent; border: 0; border-radius: 7px; padding: 6px 12px; cursor: pointer; position: relative; overflow: hidden; }
.mode-tabs button[aria-selected="true"] { color: #1a1208; background: var(--amber); }
.mode-tabs button .bar { position: absolute; left: 0; bottom: 0; height: 2px; background: rgba(26, 18, 8, .5); width: 0; }
.demo-switch { display: flex; flex-direction: column; align-items: center; width: 100%; }
.demo-switch [data-pane] { width: 100%; display: none; justify-content: center; }
.demo-switch [data-pane].on { display: flex; animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }

/* floating control chip */
.chip { position: absolute; right: 12px; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 8px; background: #1e2150; color: #fff; font: 600 11px var(--mono); padding: 7px 10px; border-radius: 9px; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(74, 222, 128, .25); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); } }
.chip .meter { width: 46px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.chip .meter span { display: block; height: 100%; width: 60%; background: var(--amber); }

/* scroll demo */
.article { padding: 18px 22px; animation: autoscroll 14s linear infinite; }
.article h5 { font: 700 18px Georgia, serif; margin: 0 0 10px; }
.article .ln { height: 7px; border-radius: 4px; background: #d9d2c4; margin: 0 0 9px; }
.article .ln.s { width: 62%; }
.article .ln.m { width: 84%; }
.article .pic { height: 90px; border-radius: 8px; margin: 12px 0 14px; background: linear-gradient(135deg, #9fc3c9, #3f6f7a); }
.article .pic.b { background: linear-gradient(135deg, #f3c96b, #c4602d); }
.article .h { height: 11px; width: 45%; border-radius: 4px; background: #b9b0a0; margin: 18px 0 12px; }
@keyframes autoscroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }

/* gallery demo */
.lightbox { position: relative; height: 290px; background: #0c0c0f; display: grid; grid-template-rows: 1fr auto; }
.lightbox .slides { position: relative; margin: 14px 40px 8px; }
.lightbox .slide { position: absolute; inset: 0; border-radius: 6px; opacity: 0; transform: scale(1.03); transition: opacity .6s ease, transform 1.8s ease; background-size: cover; background-position: center; }
.lightbox .slide.on { opacity: 1; transform: scale(1); }
.lightbox .arrow { position: absolute; top: 42%; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; font-size: 13px; }
.lightbox .arrow.l { left: 8px; } .lightbox .arrow.r { right: 8px; transition: background .2s, transform .2s; }
.lightbox .arrow.r.press { background: var(--amber); color: #1a1208; transform: scale(1.15); }
.lightbox .thumbs { display: flex; gap: 6px; justify-content: center; padding: 0 0 12px; }
.lightbox .thumbs i { width: 34px; height: 22px; border-radius: 4px; background-size: cover; background-position: center; opacity: .35; outline: 2px solid transparent; transition: opacity .3s, outline-color .3s; }
.lightbox .thumbs i.on { opacity: 1; outline-color: var(--amber); }
.lightbox .timer { position: absolute; left: 0; top: 0; height: 3px; background: var(--amber); width: 0; }

/* feed demo */
.feed-vp { position: relative; height: 290px; overflow: hidden; background: #efe9df; }
.feed { position: absolute; left: 50%; width: 76%; transform: translateX(-50%); transition: top .9s cubic-bezier(.65, 0, .35, 1); display: grid; gap: 12px; padding: 12px 0; }
.post { background: #fff; border-radius: 10px; padding: 11px 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); transition: outline-color .3s, opacity .3s; outline: 3px solid transparent; outline-offset: 2px; opacity: .5; }
.post.on { outline-color: var(--amber); opacity: 1; }
.post .who { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.post .av { width: 22px; height: 22px; border-radius: 50%; }
.post .nm { width: 80px; height: 7px; border-radius: 4px; background: #d8cfc1; }
.post .ln { height: 6px; border-radius: 3px; background: #e3dccf; margin-bottom: 6px; }
.post .ln.s { width: 60%; }
.post .media { height: 70px; border-radius: 7px; margin-top: 8px; }
.next-chip { position: absolute; left: 12px; bottom: 12px; z-index: 3; background: #1e2150; color: #fff; font: 600 11px var(--mono); padding: 7px 10px; border-radius: 9px; }

/* dice demo */
.pit-wrap { position: relative; width: 100%; max-width: 560px; }
.pit-wrap canvas { width: 100%; height: auto; display: block; border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06); }
.pit-hud { position: absolute; left: 14px; right: 14px; top: 12px; display: flex; justify-content: space-between; font: 600 12px var(--mono); color: #fff; pointer-events: none; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.pit-hud .side { display: flex; align-items: center; gap: 8px; }
.pit-hud .bar { width: 90px; height: 7px; border-radius: 4px; background: rgba(0, 0, 0, .45); overflow: hidden; }
.pit-hud .bar span { display: block; height: 100%; background: #ef4444; transition: width .4s; }
.pit-hud .bar.me span { background: var(--green); }

@media (prefers-reduced-motion: reduce) {
  .article { animation: none; }
  .cursor, .chip .dot { animation: none; }
}
.feature-row.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
@media (max-width: 900px) { .feature-row.flip { grid-template-columns: 1fr; } }
.lightbox .chip { top: 12px; bottom: auto; }
@media (max-width: 640px) {
  .site-head .wrap { padding: 0 14px; gap: 8px; }
  .nav { flex-wrap: nowrap; }
  .nav a[href="/"] { display: none; }
}
