/* Bolt Creative home: a live ASCII arcade behind a project carousel.
   The Tab Hammer pages and 404 keep using /styles.css. */
:root {
  --bg: #040917;
  --panel: rgba(6, 15, 40, 0.72);
  --panel-solid: #071232;
  --line: rgba(86, 136, 255, 0.26);
  --line-hi: rgba(120, 165, 255, 0.55);
  --blue: #2f6bff;
  --blue-2: #77a3ff;
  --ice: #d7e4ff;
  --ink: #e8eefc;
  --muted: #7d90c0;
  --orange: #ff7a1a;
  --amber: #ffb24a;
  --orange-ink: #1b0a00;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --bar-h: 72px;
  --foot-h: 60px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--bg); color: var(--ink); font: 13px/1.55 var(--mono); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── background arcade ── */
#stage { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); }
#screen { display: block; cursor: none; touch-action: none; }
#screen:focus { outline: none; }
.scan { position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px),
              radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0,0,0,0.45)); }
.nogl { color: var(--muted); padding: 40px; text-align: center; }

/* ── top bar ── */
.bar { position: fixed; z-index: 5; top: 0; left: 0; right: 0; height: var(--bar-h); padding: 0 22px;
  display: flex; align-items: center; gap: 24px; pointer-events: none; }
.bar > * { pointer-events: auto; }
.brand { display: block; height: 42px; flex: none; }
.logo { height: 100%; width: auto; display: block; }
.logo .i, .logo .c { fill: #fff; }
.logo .g { fill: transparent; }
.navlinks { display: flex; gap: 4px; margin-left: 8px; transition: opacity .4s, transform .5s var(--ease); }
.navlinks a { padding: 6px 10px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-size: 11px; border-radius: 3px; text-decoration: none; transition: color .2s; }
.navlinks a:hover { color: var(--ink); }
.navlinks a:hover span { color: var(--orange); }
body.play .navlinks { opacity: 0; transform: translateY(-10px); pointer-events: none; }

.hud { display: flex; gap: 22px; margin: 0 auto; font-variant-numeric: tabular-nums;
  opacity: 0; transform: translateY(-12px); transition: opacity .4s .25s, transform .5s .25s var(--ease); pointer-events: none; }
body.play .hud { opacity: 1; transform: none; }
.hud div { display: flex; gap: 8px; align-items: baseline; }
.hud dt { font-size: 10px; color: var(--muted); letter-spacing: .16em; text-transform: uppercase; }
.hud dd { margin: 0; font-size: 15px; font-weight: 500; }
.hud .ships { color: var(--orange); letter-spacing: .2em; }

.toggle { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px;
  border: 1px solid var(--line-hi); border-radius: 999px; background: rgba(4, 10, 28, .7); backdrop-filter: blur(8px);
  font-size: 11px; letter-spacing: .14em; flex: none; }
.toggle .lab { color: var(--muted); transition: color .3s; }
.toggle .track { position: relative; width: 58px; height: 24px; border-radius: 999px; background: rgba(47, 107, 255, .22); border: 1px solid var(--line-hi); }
.toggle .knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--blue-2);
  transition: transform .45s var(--ease), background .3s; display: grid; place-items: center; font-size: 10px; color: var(--bg); font-weight: 800; }
.toggle .lab-w { color: var(--ink); }
body.play .toggle .lab-w { color: var(--muted); }
body.play .toggle .lab-p { color: var(--orange); }
body.play .toggle .track { background: rgba(255, 122, 26, .2); border-color: rgba(255, 122, 26, .6); }
body.play .toggle .knob { transform: translateX(34px); background: var(--orange); }
.toggle:hover { border-color: var(--orange); }
.toggle kbd { font: 500 10px/1 var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 3px 5px; }

/* ── shared bits ── */
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.kicker { font-size: 11px; color: var(--blue-2); letter-spacing: .1em; text-transform: uppercase; }
.kicker .sep { color: var(--orange); }
.desc { margin: 0; color: var(--muted); max-width: 64ch; font-size: 12.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--ice); }
.tags span::before { content: "[ "; color: var(--orange); }
.tags span::after { content: " ]"; color: var(--orange); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes swapIn { from { opacity: 0; transform: translateY(6px); } }

/* ── carousel ──
   Every card has the same box (image + title bar), so the centered card and
   its neighbours share one vertical center and nothing shifts as they swap.
   carousel.js sets each card's transform every frame from one spring-driven
   position; there are no CSS transitions on the cards to fight with. */
.car { position: fixed; z-index: 3; inset: calc(var(--bar-h) + 8px) 0 var(--foot-h); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; pointer-events: none;
  --bar2-h: 52px;
  --cw: min(52vw, calc((100dvh - var(--bar-h) - var(--foot-h) - 250px - var(--bar2-h)) * 1.5)); }
.c-intro { pointer-events: auto; justify-self: start; margin: 0 0 0 22px; padding: 6px 12px; font-size: 11.5px; color: var(--muted); animation: rise .5s var(--ease) backwards; transition: transform .6s var(--ease), opacity .4s; }
.c-intro b { color: var(--ink); font-weight: 500; }
.c-intro .hot { color: var(--orange); }
.c-stage { position: relative; min-height: 0; transition: transform .8s var(--ease), opacity .5s; animation: rise .7s var(--ease) backwards .08s; }
.c-track { position: absolute; inset: 0; touch-action: pan-y; }
/* Every card's image bottom sits on one baseline, and cards scale around that
   edge: images line up along the bottom, the center card's title bar hangs
   below the line, and a taller image would grow upward. The baseline is set so
   the centered card (image + bar) is centered in the stage. */
.c-stage { --baseline: calc(50% + var(--cw) / 3 - var(--bar2-h) / 2); }
.c-card { position: absolute; left: 50%; top: var(--baseline); width: var(--cw); transform-origin: 50% calc(100% - var(--bar2-h)); pointer-events: auto; cursor: pointer; user-select: none; -webkit-user-select: none;
  transform: translate(-50%, calc(-100% + var(--bar2-h))); will-change: transform, opacity; }
.c-card.center { cursor: default; }
.c-track.dragging .c-card { cursor: grabbing; }
/* Side cards are just their ASCII image: the title bar keeps its space (so the
   image sits where it will when centered) but draws nothing. */
.c-in { border-radius: 4px; overflow: hidden; border: 1px solid transparent;
  transition: border-color .35s, background-color .35s, box-shadow .35s; }
.c-card .im { border-radius: 4px; transition: border-radius .35s; }
.c-card.center .c-in { border-color: var(--line-hi); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9); }
.c-card.center .im { border-radius: 0; }
.c-card .im::after { content: ""; position: absolute; inset: 0; z-index: 1; border: 1px solid rgba(120, 165, 255, .4); border-radius: inherit; pointer-events: none; transition: opacity .35s; }
.c-card.center .im::after { opacity: 0; }
.c-card .bar2 { transition: opacity .3s, background-color .35s, border-color .35s; }
.c-card:not(.center) .bar2 { opacity: 0; background: transparent; border-top-color: transparent; }
.c-card .im { aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg); position: relative; }
.c-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.c-card .asc { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.car.no-resolve .c-card .asc { display: none; }
.c-card .num { position: absolute; left: 12px; top: 10px; font-size: 11px; letter-spacing: .14em; padding: 3px 7px; background: rgba(4, 9, 23, .82); border: 1px solid var(--line); color: var(--orange); transition: opacity .3s; }
.c-card:not(.center) .num { opacity: 0; }
.c-card .bar2 { height: var(--bar2-h); display: flex; align-items: center; gap: 14px; padding: 0 16px; border-top: 1px solid var(--line); background: rgba(7, 18, 50, .68); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.c-card .bar2 .t { font-size: clamp(16px, 1.6vw, 22px); font-weight: 800; letter-spacing: -.01em; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-card .bar2 .y { font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.c-card .dim { position: absolute; inset: 0 0 var(--bar2-h) 0; border-radius: 4px; background: var(--bg); pointer-events: none; opacity: 0; }
.c-card.center::before, .c-card.center::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--orange); z-index: 2; }
.c-card.center::before { top: -7px; left: -7px; border-right: 0; border-bottom: 0; }
.c-card.center::after { bottom: -7px; right: -7px; border-left: 0; border-top: 0; }
.c-arrow { position: absolute; top: calc(var(--baseline) - var(--cw) / 3); z-index: 300; transform: translateY(-50%); pointer-events: auto; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-hi); background: rgba(4, 10, 28, .8); backdrop-filter: blur(8px); font-size: 20px; display: grid; place-items: center; transition: border-color .2s, color .2s; }
.c-arrow:hover { border-color: var(--orange); color: var(--orange); }
.c-arrow.l { left: calc(50% - var(--cw) / 2 - 23px); }
.c-arrow.r { right: calc(50% - var(--cw) / 2 - 23px); }

.c-foot { pointer-events: auto; justify-self: center; width: min(var(--cw), 92vw); min-height: 96px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-content: start; transition: transform .7s var(--ease), opacity .45s; }
.c-foot > .kicker, .c-foot > .desc, .c-foot > .tags { grid-column: 1; }
.c-foot.swap > .kicker, .c-foot.swap > .desc, .c-foot.swap > .tags { animation: swapIn .4s var(--ease) backwards; }
.c-foot.swap > .desc { animation-delay: .04s; }
.c-foot.swap > .tags { animation-delay: .08s; }
.c-foot .desc { color: var(--ice); opacity: .82; text-shadow: 0 0 10px var(--bg), 0 0 4px var(--bg); }
.c-side { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.c-cta { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 8px 12px; border-radius: 2px; background: var(--orange); color: var(--orange-ink); font-weight: 700; white-space: nowrap; transition: background .2s; }
.c-cta:hover { background: var(--amber); }
.c-cta[hidden] { display: none; }
.c-dots { display: flex; gap: 6px; align-items: center; }
.c-dots button { width: 8px; height: 8px; border-radius: 4px; background: rgba(120, 165, 255, .3); transition: background .3s, width .3s var(--ease); }
.c-dots button:hover { background: var(--blue-2); }
.c-dots button[aria-current="true"] { width: 22px; background: var(--orange); }
.noscript { pointer-events: auto; grid-row: 2; align-self: center; justify-self: center; max-width: 60ch; display: grid; gap: 8px; color: var(--ice); }

body.play .c-intro { transform: translateY(-200%); opacity: 0; }
body.play .c-stage { transform: translateY(70vh) rotate(-3deg) scale(.9); opacity: 0; }
body.play .c-stage .c-card, body.play .c-arrow { pointer-events: none; }
body.play .c-foot { transform: translateY(200%); opacity: 0; pointer-events: none; }

/* ── bottom status ── */
.status { position: fixed; z-index: 4; left: 22px; right: 22px; bottom: 0; min-height: var(--foot-h); display: flex; flex-wrap: wrap; align-items: center; column-gap: 18px;
  font-size: 11px; color: var(--muted); transition: transform .6s var(--ease), opacity .4s; }
.status .p { color: var(--orange); }
.status b { color: var(--ice); font-weight: 500; font-variant-numeric: tabular-nums; }
.arcade-status b { display: inline-block; min-width: 2ch; text-align: right; } /* counts don't nudge the footer as they change */
.status .r { white-space: nowrap; }
.side-toggle { margin-left: auto; padding: 3px 8px; border: 1px solid var(--line); border-radius: 3px; background: rgba(4, 10, 28, .7); white-space: nowrap; transition: border-color .2s; }
.side-toggle:hover { border-color: var(--orange); }
.side-toggle[aria-pressed="true"] b { color: var(--orange); }
.foot-links { display: flex; gap: 14px; white-space: nowrap; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.footer-note { flex-basis: 100%; margin: 0 0 8px; font-size: 10px; opacity: .7; }
body.play .status { transform: translateY(100%); opacity: 0; }

/* ── play dock (filled by the arcade) ── */
.dock { position: fixed; z-index: 4; left: 22px; right: 22px; bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  font-size: 11px; color: var(--muted); opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .4s, transform .6s var(--ease); }
body.play .dock { opacity: 1; transform: none; pointer-events: auto; transition-delay: .3s; }
.dock .grp { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 3px; background: rgba(4, 10, 28, .7); backdrop-filter: blur(6px); }
.dock .grp > span { padding: 0 6px; letter-spacing: .14em; text-transform: uppercase; font-size: 10px; }
.dock button { padding: 5px 8px; border-radius: 2px; color: var(--ice); }
.dock button:hover { background: rgba(47, 107, 255, .2); }
.dock button[aria-pressed="true"] { background: var(--orange); color: var(--orange-ink); }
.dock .keys { margin-left: auto; }
.dock kbd { font: 500 10px/1 var(--mono); color: var(--ice); border: 1px solid var(--line-hi); border-bottom-width: 2px; border-radius: 3px; padding: 3px 5px; }

@media (max-width: 900px) {
  :root { --bar-h: 60px; --foot-h: 64px; }
  .bar { padding: 0 14px; gap: 12px; }
  .brand { height: 32px; }
  .navlinks { margin-left: 0; }
  .navlinks a { padding: 6px; font-size: 10px; }
  .hud, .toggle kbd, .status .r, .arcade-status { display: none; }
  body.play .hud { display: flex; gap: 12px; margin: 0; }
  body.play .hud div:nth-child(n+4) { display: none; }
  body.play .navlinks { display: none; }
  .car { --bar2-h: 44px; --cw: min(80vw, calc((100dvh - var(--bar-h) - var(--foot-h) - 210px - var(--bar2-h)) * 1.5)); }
  .c-intro { display: none; }
  .car { grid-template-rows: auto auto; align-content: center; }
  .c-stage { height: calc(var(--cw) / 1.5 + var(--bar2-h) + 32px); }
  .c-arrow { display: none; }
  .c-foot { grid-template-columns: 1fr; min-height: 0; }
  .c-side { grid-column: 1; grid-row: auto; flex-direction: row; justify-content: space-between; align-items: center; }
  .c-foot .tags { display: none; }
  .c-foot .desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .status { left: 14px; right: 14px; }
  .foot-links span { display: none; }
  .dock .keys { display: none; }
}
@media (max-width: 520px) {
  .navlinks a:first-child { display: none; }
  .toggle { gap: 6px; padding: 5px 6px 5px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .c-stage, .c-intro, .c-foot, .status, .dock, .hud, .navlinks { transition-duration: .01s !important; animation: none !important; }
  .c-foot.swap > * { animation: none !important; }
}
