/* ax333-live.css — Vibrant, chart-driven PocketJS-family landing page for ax333.pocketjs.dev. */

/* Fixed 60 Hz ambient telemetry background canvas */
#ax-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}
header.nav,
main,
footer.foot {
  position: relative;
  z-index: 1;
}

/* Override sticky nav top when no preview switcher bar is present */
.nav {
  top: 0 !important;
}

/* GitHub icon inline inside CTAs & nav */
.gh-ico {
  width: 16px;
  height: 16px;
  flex: none;
  display: inline-block;
  vertical-align: -2px;
}
.btn .gh-ico,
.nav .icons a.gh .gh-ico {
  margin-right: 7px;
}
.nav .icons a.gh {
  display: inline-flex;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Subtle live ambient grid behind hero */
.hero-grid {
  position: absolute;
  inset: 0 0 auto;
  height: 620px;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 80%);
}

/* Real Hardware Device Shell Frames (exact pixel ratios from PocketJS profiles.js)
   IMPORTANT: psp.webp and ipod-touch-5.webp have opaque screen regions,
   so shell-art sits at z-index: 1 and .shell-screen sits ABOVE at z-index: 2! */
.hw-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 10px 6px;
  min-height: 230px;
}
.hw-shell {
  position: relative;
  width: 100%;
  user-select: none;
  filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.72));
}
.hw-shell img.shell-art {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.hw-shell .shell-screen {
  position: absolute;
  z-index: 2;
  background: #000;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hw-shell .shell-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}
.hw-shell .shell-screen canvas.live-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s ease;
  touch-action: none;
  outline: none;
}
.hw-shell .shell-screen canvas.live-canvas.ready {
  opacity: 1;
}
.hw-shell .shell-screen canvas.live-canvas:focus-visible {
  box-shadow: inset 0 0 0 2px var(--c);
}
.hw-shell .live-pill {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  font: 600 10px var(--mono);
  color: var(--ink);
  background: rgba(11, 10, 16, 0.78);
  padding: 3px 7px;
  border-radius: 6px;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.hw-shell .live-pill.done {
  opacity: 0;
}

/* Clickable transparent PSP physical button overlays (outside screen area) */
.psp-hotspots {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.psp-btn-hit {
  position: absolute;
  pointer-events: auto;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.psp-btn-hit:hover {
  background: rgba(63, 208, 232, 0.18);
  box-shadow: 0 0 0 1px rgba(63, 208, 232, 0.45);
}
.psp-btn-hit.down {
  background: rgba(255, 210, 63, 0.36);
  box-shadow: 0 0 10px rgba(255, 210, 63, 0.5);
}

/* PSP exact rect: 2408x1042, screen [530, 97, 1331, 778] */
.hw-shell.psp {
  max-width: 520px;
  aspect-ratio: 2408 / 1042;
}
.hw-shell.psp .shell-screen {
  left: 22.01%;
  top: 9.31%;
  width: 55.27%;
  height: 74.66%;
}
/* iPod touch 5 exact rect: 977x2007, screen [84, 292, 818, 1434] */
.hw-shell.ipod {
  max-width: 168px;
  aspect-ratio: 977 / 2007;
}
.hw-shell.ipod .shell-screen {
  left: 8.6%;
  top: 14.55%;
  width: 83.73%;
  height: 71.45%;
}
/* Larger stage variant for story carousel */
.hw-shell.psp.lg {
  max-width: 540px;
}
.hw-shell.ipod.lg {
  max-width: 205px;
}

/* Interactive console subtle footer line */
.console-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  font: 500 12px var(--mono);
  color: var(--muted);
  flex-wrap: wrap;
}
.console-meta .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle;
}
.console-reset {
  border: 0;
  background: transparent;
  color: var(--c);
  font: 600 12px var(--mono);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.console-reset:hover {
  color: var(--y);
}

/* Telemetry bar under hardware (clean hairline metrics, no pill chips) */
.hw-telemetry {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.hw-chip {
  font: 500 12px var(--mono);
  color: var(--muted);
}
.hw-chip b {
  color: var(--ink);
  font-weight: 600;
}

/* Footnote marker & caption */
sup.fn {
  font-size: 0.68em;
  color: var(--y);
  margin-left: 1px;
  font-weight: 700;
}
.seg button.on sup.fn {
  color: #7a4c00;
}
.fn-note {
  margin-top: 14px;
  font: 500 12.5px var(--mono);
  color: var(--muted);
}
.fn-note b {
  color: var(--ink-2);
}

/* ===== ARC 1 OPENING NARRATIVE ===== */
.story-bridge {
  padding: 52px 0 18px;
}
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.sec-head h2 {
  font: 700 clamp(30px, 4vw, 48px) / 1.06 var(--disp);
  letter-spacing: -0.035em;
}
.sec-head .short-note {
  max-width: 440px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.55;
}
.arc1-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 18px;
  align-items: stretch;
}
.vis-panel {
  background: rgba(23, 21, 31, 0.88);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 24px 26px;
  box-shadow: 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.vis-panel h3 {
  font: 700 22px/1.18 var(--disp);
  letter-spacing: -0.025em;
  color: var(--ink);
}
.vis-panel .vp-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.45;
}
.ax333-split {
  display: grid;
  grid-template-rows: auto auto;
  gap: 18px;
}
.mini-hw-row {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
}
.psp-narrative {
  font-size: 14px;
  line-height: 1.58;
  color: var(--ink-2);
}
.psp-narrative b {
  color: var(--ink);
  font-weight: 600;
}

/* On-demand interactive architecture diagram & detail drawer */
.arch-node {
  cursor: pointer;
  transition: opacity 0.15s ease, filter 0.15s ease;
}
.arch-node:hover {
  filter: brightness(1.18);
}
.arch-drawer {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(13, 12, 18, 0.9);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.arch-drawer strong {
  font: 600 13px var(--mono);
  color: var(--c);
}
.arch-drawer span {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.45;
  flex: 1 1 240px;
}

/* Visual 3-Step Benchmark Pipeline Diagram */
.score-flow {
  margin-top: 22px;
  background: rgba(23, 21, 31, 0.86);
  backdrop-filter: blur(8px);
  border-radius: 22px;
  padding: 18px 22px;
  box-shadow: 0 0 0 1px var(--line);
  display: grid;
  grid-template-columns: 1fr 30px 1fr 30px 1fr;
  align-items: center;
  gap: 8px;
}
.sf-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(13, 12, 18, 0.65);
  border: 1px solid var(--line);
}
.sf-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-2);
  color: var(--k);
}
.sf-step h4 {
  font: 700 15.5px/1.2 var(--disp);
  color: var(--ink);
}
.sf-step p {
  font: 400 13px/1.38 var(--sans);
  color: var(--ink-2);
  margin-top: 3px;
}
.sf-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
@keyframes flowPulse {
  0%, 100% { opacity: 0.4; transform: translateX(-2px); }
  50% { opacity: 1; transform: translateX(3px); }
}
.sf-arrow svg {
  width: 20px;
  height: 20px;
  animation: flowPulse 2s ease-in-out infinite;
}

/* Workbench right header without uppercase pill */
.wb-right-title {
  font: 600 13px var(--sans);
  color: var(--ink-2);
}

/* Charts Section (2-up + Full-width Vanilla Baseline chart) */
.charts-duo {
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  gap: 18px;
  margin-top: 40px;
}
.chart-card {
  background: rgba(23, 21, 31, 0.88);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 26px 26px 22px;
  box-shadow: 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
  position: relative;
}
.chart-card.full {
  margin-top: 18px;
}
.chart-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.chart-top h3 {
  font: 700 20px/1.2 var(--disp);
  letter-spacing: -0.02em;
}
.chart-top p {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 4px;
}
.chart-svg-wrap {
  margin-top: 16px;
  position: relative;
  flex: 1;
}
.chart-svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.chart-foot {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  background: rgba(11, 10, 16, 0.96);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 10px 13px;
  font: 12px/1.55 var(--mono);
  color: var(--ink);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
  transition: opacity 0.14s ease;
  z-index: 20;
  min-width: 185px;
  max-width: 260px;
}
.chart-tooltip.show {
  opacity: 1;
}
.chart-tooltip .tt-name {
  font: 700 13.5px var(--disp);
  margin-bottom: 4px;
}
.chart-tooltip .tt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-2);
}
.chart-tooltip .tt-row b {
  color: var(--ink);
}
.dot-hit {
  cursor: pointer;
  transition: filter 0.16s ease;
}
.dot-hit:hover {
  filter: brightness(1.22);
}

/* ===== 4-STORY COMPACT INTERACTIVE CAROUSEL ===== */
.carousel-shell {
  margin-top: 40px;
  background: rgba(23, 21, 31, 0.88);
  backdrop-filter: blur(8px);
  border-radius: 26px;
  box-shadow: 0 0 0 1px var(--line), 0 36px 80px -48px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}
.carousel-stage {
  padding: 34px 36px 28px;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 34px;
  align-items: center;
  min-height: 410px;
}
.story-device-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.story-copy-col h3 {
  font: 700 29px/1.12 var(--disp);
  letter-spacing: -0.03em;
  color: var(--ink);
}
.story-copy-col .story-lead {
  margin-top: 14px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}
.story-copy-col .story-mech {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.56;
}
.story-bars {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.story-bars .sb-head {
  font: 600 11.5px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 10px;
}
.carousel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 12, 18, 0.76);
  flex-wrap: wrap;
}
.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.carousel-dots button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 600 13.5px var(--sans);
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.carousel-dots button i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-2);
  transition: background 0.15s, transform 0.15s;
}
.carousel-dots button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}
.carousel-dots button.on {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-2);
}
.carousel-dots button.on i {
  background: var(--c);
  transform: scale(1.25);
}
.carousel-arrows {
  display: inline-flex;
  gap: 8px;
}
.carousel-arrows button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.carousel-arrows button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--c);
}

/* ===== WHY POCKETJS: HISTOGRAM FROM "UI RUNTIME THAT CAN'T FLAKE" + LIVE HARDWARE ===== */
.engine-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
  margin-top: 38px;
}
.sim-card {
  background: rgba(23, 21, 31, 0.88);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 26px 26px 24px;
  box-shadow: 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hist-bar {
  transform-box: fill-box;
  transform-origin: bottom;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.hist-bar.zero {
  transform: scaleY(0.02);
}
.hist-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.sim-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font: 600 12.5px var(--mono);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.sim-btn:hover {
  border-color: var(--c);
  background: rgba(63, 208, 232, 0.14);
}
.blog-link {
  font: 600 13px var(--sans);
  color: var(--c);
  text-decoration: none;
}
.blog-link:hover {
  color: var(--y);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Hardware Console Strip inside Engine Card */
.console-showcase {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.console-mini-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  width: 100%;
  flex-wrap: wrap;
}
.console-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 12px var(--mono);
  color: var(--ink-2);
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.console-mini:hover {
  color: var(--c);
  border-color: var(--line-2);
  background: rgba(63, 208, 232, 0.08);
}
.console-mini img {
  height: 28px;
  width: auto;
  opacity: 0.9;
}

/* Audience Lens Visual Panel */
.lens-visual {
  background: #0d0c12;
  border-radius: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line);
}
.lens-visual h4 {
  font: 700 14.5px var(--disp);
  color: var(--ink);
  margin-bottom: 4px;
}
.lens-visual .lv-sub {
  font: 500 12px var(--mono);
  color: var(--muted);
  margin-bottom: 14px;
}

/* Workbench table row hover & translucent panel polish */
.wb-shell,
.lens-wrap,
.ortho-box {
  background: rgba(23, 21, 31, 0.88);
  backdrop-filter: blur(8px);
}
table.ax-tbl tbody tr {
  transition: background 0.14s ease;
}
table.ax-tbl tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

@media (max-width: 980px) {
  .arc1-grid,
  .mini-hw-row,
  .score-flow,
  .charts-duo,
  .carousel-stage,
  .engine-grid {
    grid-template-columns: 1fr;
  }
  .sf-arrow svg {
    transform: rotate(90deg);
  }
}
@media (max-width: 640px) {
  .carousel-stage {
    padding: 22px 20px;
  }
}
