/* VIC-X page: the C64 boot screen, with a 16-bit palette breaking through.
   Headings use the machine's own character set, built from the C64 character ROM
   by tools/make_c64_font.py. Loaded after site.css and themes.css. */

@font-face {
  font-family: "ES C64";
  src: url("../fonts/c64.ttf") format("truetype");
  font-display: swap;
}

[data-theme="vicx"] {
  --bg: #1d1c66; --bg-2: #24238a; --panel: #2e2c9b; --line: rgba(112,109,235,.7);
  --text: #fff; --muted: #c9c8f5;
  --accent: #fad440; --accent-2: #78b2ee; --on-accent: #1d1c66; --glow: rgba(250,212,64,.3);
  --font-display: "ES C64", "Courier New", monospace; --radius: 10px;
  --font-body: "Inter", system-ui, sans-serif; --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --c64: "ES C64", "Courier New", monospace;
}
body[data-theme="vicx"] { box-shadow: inset 0 0 0 14px #706deb; }
[data-theme="vicx"] img, [data-theme="vicx"] video { image-rendering: pixelated; }
[data-theme="vicx"] h1, [data-theme="vicx"] h2, [data-theme="vicx"] h3 { letter-spacing: 0; font-weight: 400; text-transform: uppercase; line-height: 1.15; }
[data-theme="vicx"] .p-hero { padding-top: clamp(30px, 5vw, 60px); }
[data-theme="vicx"] .p-hero h1 { font-size: clamp(56px, 9vw, 112px); line-height: 1; margin: 14px 0 22px; }
[data-theme="vicx"] .p-hero h1 .hot { background: linear-gradient(#fad440 0 34%, #f08a3c 34% 67%, #d64034 67%); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="vicx"] .sec-head h2 { font-size: clamp(22px, 3.3vw, 40px); line-height: 1.25; }
[data-theme="vicx"] .sec-head h2 em { color: var(--accent); }
[data-theme="vicx"] h2.c64 { font-size: clamp(22px, 3.3vw, 40px); line-height: 1.25; margin: 18px 0 22px; }
[data-theme="vicx"] .orb { display: none; }
[data-theme="vicx"] .backdrop::before { opacity: .3; background-size: 32px 32px; }
[data-theme="vicx"] .nav { background: #1d1c66; }
[data-theme="vicx"] .nav-links a { padding: 8px 11px; }
@media (max-width: 1040px) { [data-theme="vicx"] .brand span { display: none; } }
[data-theme="vicx"] .btn, [data-theme="vicx"] .nav-links, [data-theme="vicx"] .nav-links a, [data-theme="vicx"] .tag, [data-theme="vicx"] .nav-toggle { border-radius: 6px; }
[data-theme="vicx"] .kicker { font-family: var(--c64); letter-spacing: .08em; font-size: 12px; }
[data-theme="vicx"] .marquee span { font-weight: 400; font-size: clamp(16px, 2vw, 24px); }
[data-theme="vicx"] .feature { background: #24238a; }
[data-theme="vicx"] .feature .ico { font-size: 24px; font-family: var(--c64); letter-spacing: 0; color: var(--accent); line-height: 1; }
[data-theme="vicx"] .feature h3 { font-size: 16px; line-height: 1.4; }
[data-theme="vicx"] .services h3 { font-size: 16px; line-height: 1.4; }
[data-theme="vicx"] .venture h3 { font-family: var(--font-body); font-weight: 800; text-transform: none; }

/* media: the videos are the 320x200 picture area with the C64 border cropped off, so
   frames get that exact shape and the picture fills them edge to edge */
[data-theme="vicx"] .p-hero .art, [data-theme="vicx"] .shots figure { border: 3px solid #706deb; background: #000; border-radius: var(--radius); overflow: hidden; }
.art-col { min-width: 0; }
.art-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 12px; }
.art-title { font-family: var(--c64); font-size: clamp(11px, 1.3vw, 14px); line-height: 1.5; text-transform: uppercase; color: var(--accent); margin: 0; }
.art-expand, .viewer-close { font-family: var(--c64); font-size: 11px; text-transform: uppercase; color: #fff; background: #2e2c9b; border: 2px solid #706deb; border-radius: 6px; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.art-expand:hover, .viewer-close:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
/* the overlay shows the video no larger than an 800x600 box: 800x500 at its 16:10 shape (plus the 3px border) */
.viewer { box-sizing: border-box; width: min(806px, 94vw, calc((100vh - 130px) * 1.6)); max-width: none; max-height: none; padding: 0; border: 3px solid #706deb; border-radius: var(--radius); background: #000; color: #fff; overflow: hidden; box-shadow: 0 40px 120px #000; }
.viewer::backdrop { background: rgba(8, 7, 40, .86); }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; background: #1d1c66; border-bottom: 3px solid #706deb; }
.viewer-bar span { font-family: var(--c64); font-size: clamp(10px, 1.4vw, 14px); text-transform: uppercase; color: var(--accent); }
.viewer video { display: block; width: 100%; max-width: 800px; max-height: 600px; margin: 0 auto; height: auto; aspect-ratio: 320 / 200; image-rendering: pixelated; background: #000; }
[data-theme="vicx"] .p-hero .art { aspect-ratio: 320 / 200; box-shadow: 0 30px 90px -30px #000; }
[data-theme="vicx"] .p-hero .art video, [data-theme="vicx"] .p-hero .art img,
[data-theme="vicx"] .shots video, [data-theme="vicx"] .shots img { display: block; width: 100%; height: auto; aspect-ratio: 320 / 200; object-fit: cover; }
/* the wide demo draws in the border, so it keeps the whole 384x272 frame */
[data-theme="vicx"] .shots video.full { object-fit: contain; background: #000; }
[data-theme="vicx"] .shots { grid-template-columns: repeat(3, 1fr); }
[data-theme="vicx"] .shots figcaption { font-family: var(--font-body); font-size: 14.5px; line-height: 1.45; padding: 14px 16px 16px; }
[data-theme="vicx"] .shots figcaption b { display: block; font-family: var(--c64); font-weight: 400; font-size: 14px; color: var(--accent); text-transform: uppercase; margin-bottom: 6px; }

.boot { font-family: var(--c64); font-size: 12px; line-height: 2; color: #a9a7ff; text-transform: uppercase; }
.boot b { color: #fff; font-weight: 400; }
.boot .cur { display: inline-block; width: 1em; height: 1em; background: #a9a7ff; vertical-align: -0.12em; animation: blink 1s steps(1) infinite; }
.unlock { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-family: var(--font-mono); }
.unlock code { font-family: var(--c64); font-size: clamp(18px, 2.8vw, 32px); background: #000; color: var(--accent); padding: 12px 18px; border: 3px solid #706deb; border-radius: 6px; }
.unlock span { color: var(--muted); font-size: 14px; }
.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.specs div { border-top: 3px solid var(--accent); padding-top: 16px; }
.specs b { display: block; font-family: var(--c64); font-weight: 400; font-size: clamp(26px, 3.6vw, 48px); line-height: 1; margin-bottom: 10px; }
.specs span { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* developer documentation */
.doc-hero { padding: clamp(34px, 5vw, 64px) 0 clamp(20px, 3vw, 34px); }
.doc-hero h1 { font-size: clamp(24px, 4.4vw, 52px); line-height: 1.2; margin: 18px 0 20px; }
.doc-hero .sub { color: var(--muted); max-width: 70ch; font-size: clamp(16px, 1.5vw, 19px); }
.doc-status { margin-top: 20px; max-width: 78ch; font-size: 15px; color: var(--muted); border-left: 4px solid var(--accent); padding: 4px 0 4px 16px; }
.doc-status b { color: var(--accent); }
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-bottom: 90px; }
.toc { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; font-size: 14.5px; padding-right: 6px; }
.toc b { display: block; font-family: var(--c64); font-weight: 400; font-size: 12px; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid rgba(112,109,235,.5); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: #fff; border-left-color: var(--accent); }
.doc { min-width: 0; font-size: 16.5px; }
.doc h2 { font-size: clamp(18px, 2.3vw, 26px); line-height: 1.3; color: var(--accent); margin: 64px 0 18px; padding-top: 22px; border-top: 3px solid #706deb; scroll-margin-top: 90px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 15px; line-height: 1.5; margin: 34px 0 12px; color: #fff; }
.doc p { margin: 0 0 14px; max-width: 78ch; }
.doc ul { margin: 0 0 16px; padding-left: 22px; max-width: 80ch; }
.doc li { margin-bottom: 8px; }
.doc ul.ticks { list-style: none; padding: 0; }
.doc ul.ticks li { padding-left: 26px; position: relative; }
.doc ul.ticks li::before { content: ">"; font-family: var(--c64); color: var(--accent); position: absolute; left: 0; top: 3px; font-size: 13px; }
.doc a { color: var(--accent-2); }
.doc a:hover { color: var(--accent); }
.doc code, .doc-status code { font-family: var(--font-mono); font-size: .9em; background: #12114a; border: 1px solid rgba(112,109,235,.55); border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.doc pre { background: #0b0a36; border: 2px solid #706deb; border-radius: 8px; padding: 16px 18px; overflow-x: auto; margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; tab-size: 8; }
.doc pre code { background: none; border: 0; padding: 0; white-space: pre; font-size: inherit; color: #e6e5ff; }
.doc pre.basic { background: #2e2c9b; border-color: #706deb; }
.doc pre.basic code { color: #a9a7ff; }
.tbl { overflow-x: auto; margin: 0 0 18px; border: 2px solid #706deb; border-radius: 8px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: 15px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid rgba(112,109,235,.45); }
.tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 0; }
.tbl th { background: #2e2c9b; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.tbl td:first-child { white-space: nowrap; }
.tbl td { background: #1a1960; }
.note { border: 2px solid #706deb; border-left-width: 6px; border-radius: 8px; background: #24238a; padding: 16px 18px; margin: 0 0 18px; max-width: 86ch; }
.note b { color: var(--accent-2); }
.note p { margin: 8px 0 0; }
.note ul { margin: 8px 0 0; }
.note.warn { border-color: var(--accent); background: #2a2760; }
.note.warn > b { color: var(--accent); display: block; font-size: 17px; }
figure.ex { margin: 0 0 18px; display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: start; }
figure.ex pre { margin: 0; }
figure.ex img { width: 100%; height: auto; border: 3px solid #706deb; border-radius: 8px; background: #000; position: sticky; top: 92px; }
.doc .fine { font-size: 14px; color: var(--muted); }
.lang { margin: 0 0 30px; }
.lang-tabs { display: inline-flex; border: 2px solid #706deb; border-bottom: 0; border-radius: 8px 8px 0 0; overflow: hidden; }
.lang-tabs button { font-family: var(--c64); font-size: 12px; text-transform: uppercase; padding: 11px 18px; border: 0; background: #1a1960; color: var(--muted); cursor: pointer; }
.lang-tabs button + button { border-left: 2px solid #706deb; }
.lang-tabs button:hover { color: #fff; }
.lang-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.lang-panel figure.ex pre { border-top-left-radius: 0; }
.lang-panel figure.ex { margin-bottom: 10px; }
.lang-panel .fine { margin-bottom: 6px; }
.no-js .lang-tabs { display: none; }
@media (max-width: 1000px) {
  .docs { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; border: 2px solid #706deb; border-radius: 8px; padding: 16px; }
  .toc ol { columns: 2; border-left: 0; }
  .toc a { padding-left: 0; border-left: 0; }
  figure.ex { grid-template-columns: 1fr; }
  figure.ex img { position: static; max-width: 320px; }
}
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* downloads */
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.dl { background: #24238a; border: 3px solid #706deb; border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; gap: 14px; }
.dl-tag { align-self: flex-start; font-family: var(--c64); font-size: 12px; text-transform: uppercase; color: var(--on-accent); background: var(--accent-2); padding: 6px 10px; }
.dl h3 { font-size: 18px; line-height: 1.4; }
.dl p { color: var(--muted); }
.dl ul { list-style: none; margin: 0; padding: 0; }
.dl li { padding: 7px 0 7px 26px; position: relative; font-size: 15.5px; border-top: 1px solid rgba(112,109,235,.4); }
.dl li::before { content: ">"; font-family: var(--c64); color: var(--accent); position: absolute; left: 0; top: 10px; font-size: 13px; }
.dl-actions { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.dl-src { font-family: var(--font-mono); font-size: 13.5px; color: var(--accent-2); }
.dl-src:hover { color: var(--accent); }
.dl-size { font-weight: 400; opacity: .8; }
.dl-source { margin-top: 22px; background: #24238a; border: 3px solid #706deb; border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); }
.dl-source h3 { font-size: 16px; line-height: 1.4; color: var(--accent); margin-bottom: 10px; }
.dl-source p { color: var(--muted); max-width: 80ch; }
.dl-source a { color: var(--accent-2); overflow-wrap: anywhere; }
.dl-source a:hover { color: var(--accent); }
.btn.soon { background: transparent; color: var(--muted); border-style: dashed; border-color: #706deb; cursor: default; }
.btn.soon:hover { transform: none; box-shadow: none; }

/* FPGA fit */
.fit-body { max-width: 1100px; }
.fit-body h3 { font-size: 16px; line-height: 1.4; color: var(--accent); margin: 44px 0 12px; }
.fit-body h3:first-child { margin-top: 0; }
.fit-body > p { color: var(--muted); max-width: 80ch; margin: 0 0 16px; font-size: 15.5px; }
.fit-body .fine { font-size: 14px; }
.fit-body a { color: var(--accent-2); }
.fit-body a:hover { color: var(--accent); }
.fit-body > p code { white-space: normal; overflow-wrap: anywhere; }
.fit-body code { font-family: var(--font-mono); font-size: .88em; background: #12114a; border: 1px solid rgba(112,109,235,.55); border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.fit .tbl table { font-size: 14.5px; }
.fit .tbl td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fit .tbl td:first-child { white-space: normal; min-width: 230px; }
.fit-list { list-style: none; margin: 0; padding: 0; max-width: 86ch; }
.fit-list li { padding: 10px 0 10px 28px; position: relative; color: var(--muted); border-top: 1px solid rgba(112,109,235,.4); font-size: 15.5px; }
.fit-list li::before { content: ">"; font-family: var(--c64); color: var(--accent); position: absolute; left: 0; top: 13px; font-size: 14px; }
.goal p a { color: var(--accent-2); }
@media (max-width: 700px) {
  .fit .tbl td:first-child { min-width: 150px; }
  .fit .tbl th, .fit .tbl td { padding: 8px 10px; }
}

/* the goal + petition */
.goal { background: #000; border-block: 3px solid #706deb; padding: clamp(26px, 4vw, 44px) 0; }
.goal .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(18px, 3vw, 40px); align-items: center; }
.goal .tagline { font-family: var(--c64); font-size: 12px; color: var(--on-accent); background: var(--accent); padding: 8px 12px; text-transform: uppercase; white-space: nowrap; }
.goal h2 { font-size: clamp(16px, 2.2vw, 26px); line-height: 1.4; }
.goal h2 em { font-style: normal; color: var(--accent); }
.goal p { color: var(--muted); margin-top: 10px; max-width: 62ch; font-size: 16px; }

.petition { background: #000; border-block: 3px solid #706deb; }
.petition .split { align-items: start; }
.petition .count { font-family: var(--c64); color: var(--accent); font-size: clamp(34px, 5vw, 64px); line-height: 1; margin: 26px 0 8px; }
.petition .count-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.petition ul.why { list-style: none; margin: 24px 0 0; padding: 0; }
.petition ul.why li { padding: 10px 0 10px 28px; position: relative; color: var(--muted); border-top: 1px solid rgba(112,109,235,.4); }
.petition ul.why li::before { content: ">"; font-family: var(--c64); color: var(--accent); position: absolute; left: 0; top: 13px; font-size: 14px; }
.sign { background: var(--bg); border: 3px solid #706deb; border-radius: var(--radius); padding: clamp(20px, 3vw, 34px); display: grid; gap: 16px; }
.sign h3 { font-size: 16px; color: var(--accent); }
.sign label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.sign label span i { font-style: normal; font-weight: 400; color: var(--muted); }
.sign input[type="text"], .sign input[type="email"], .sign select, .sign textarea {
  width: 100%; font: 16px/1.4 var(--font-body); color: #fff; background: #12114a; border: 2px solid #706deb; border-radius: 6px; padding: 12px 14px; }
.sign textarea { resize: vertical; min-height: 84px; }
.sign input:focus, .sign select:focus, .sign textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.sign .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sign .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); font-size: 14px; }
.sign .check input { margin-top: 3px; accent-color: #fad440; width: 18px; height: 18px; flex: none; }
.sign .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sign button { justify-self: start; }
.sign button[disabled] { opacity: .6; cursor: progress; }
.sign .msg { font-size: 15px; min-height: 1.4em; }
.sign .msg.ok { color: #a9ff9f; }
.sign .msg.err { color: #ff9b9b; }
.sign .fine { font-size: 13px; color: var(--muted); }
.sign .fine a { color: var(--accent-2); }
.disclaimer { font-size: 13px; color: var(--muted); margin-top: 22px; }

@media (max-width: 900px) {
  [data-theme="vicx"] .shots { grid-template-columns: 1fr 1fr; }
  .goal .wrap { grid-template-columns: 1fr; }
  .goal .tagline { justify-self: start; }
}
@media (max-width: 700px) {
  .specs { grid-template-columns: 1fr 1fr; }
  body[data-theme="vicx"] { box-shadow: inset 0 0 0 6px #706deb; }
  [data-theme="vicx"] .shots, .sign .row, .downloads { grid-template-columns: 1fr; }
  [data-theme="vicx"] .p-hero h1 { font-size: clamp(44px, 15vw, 72px); }
}
