/* Colfax64 home page */
@font-face { font-family: 'VT323'; src: url(fonts/VT323-Regular.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'Leapman'; src: url(fonts/leapman.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'Geist'; font-weight: 100 900; src: url(fonts/geist.woff2) format('woff2'); font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { background: #000; }
body {
  margin: 0; min-height: 100vh; background: #000; color: #e9e6df;
  font-family: Georgia, 'Palatino Linotype', 'Book Antiqua', 'Times New Roman', serif;
  -webkit-text-size-adjust: 100%;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

/* ---------- header ---------- */
.hero { position: relative; max-width: 1915px; margin: 0 auto; }
.hero > img { width: 100%; height: auto; }
/* the nameplate on the desk: a link to Wikipedia. Position in % of the 1915 x 821 picture. */
.plate { position: absolute; left: 51.85%; top: 76.98%; width: 18.02%; height: 10.96%; border-radius: 4px; transition: box-shadow .2s, background .2s; }
.plate:hover { background: rgba(255,255,255,.10); box-shadow: 0 0 0 1px rgba(255,255,255,.55), 0 0 26px rgba(255,255,255,.45); }
.plate:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.masthead {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 26px 20px 30px; text-align: center;
}
.masthead h1 {
  display: flex; align-items: center; gap: 22px; width: min(100%, 760px);
  font-size: clamp(24px, 3.2vw, 38px); font-weight: 400; letter-spacing: .34em; text-transform: uppercase;
  padding-left: .34em; white-space: nowrap;
}
.masthead h1::before, .masthead h1::after {
  content: ""; flex: 1; height: 5px; border-top: 1px solid #e9e6df; border-bottom: 1px solid #e9e6df; opacity: .55;
}
.masthead p { font-style: italic; font-size: clamp(15px, 1.4vw, 18px); color: #b9b5ab; letter-spacing: .04em; }

/* ---------- section bar ---------- */
.bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 32px;
  padding: 14px clamp(20px, 4vw, 56px);
  border-top: 1px solid rgba(233,230,223,.5); border-bottom: 1px solid rgba(233,230,223,.5);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 1px, transparent 1px 5px), #0a0a0a;
}
.bar h2 {
  display: flex; align-items: center; gap: 14px;
  font-size: clamp(20px, 2vw, 26px); font-weight: 400; letter-spacing: .3em; text-transform: uppercase;
}
.bar h2::before { content: ""; width: 9px; height: 9px; background: #e9e6df; transform: rotate(45deg); }
.bar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 28px; }
.bar nav a, .bar nav .soon-link {
  padding: 8px 0; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: #e9e6df; text-decoration: none;
  border-bottom: 1px solid transparent;
}
.bar nav a:hover { border-bottom-color: #e9e6df; }
.bar nav a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.bar nav .soon-link { color: #8d897f; }
.bar nav .soon-link em { font-size: 11px; font-style: normal; border: 1px solid #5d5a53; padding: 1px 6px; margin-left: 6px; letter-spacing: .12em; }

/* ---------- banner: shared ---------- */
.banner {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: clamp(240px, 23vw, 340px);
  color: inherit; text-decoration: none; border-bottom: 3px solid #000;
}
a.banner:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.banner .body {
  position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px;
  padding: clamp(22px, 2.6vw, 38px) clamp(20px, 4vw, 56px);
}
.banner .art { position: relative; z-index: 1; min-width: 0; }
.banner .art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
a.banner:hover .art > img { transform: scale(1.04); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border: 1px solid currentColor; line-height: 17px; }
.name { font-size: clamp(38px, 5.2vw, 76px); line-height: 1; }
.tag { font-size: clamp(15px, 1.25vw, 18px); line-height: 1.5; max-width: 50ch; }
.cta {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; padding: 9px 16px;
  font-size: 15px; font-weight: 700; border: 2px solid currentColor; transition: background .15s, color .15s;
}
.cta .arrow { transition: transform .2s ease; }
a.banner:hover .cta .arrow { transform: translateX(5px); }

/* ---------- NeonTracker ---------- */
.neon { background: #020a02; color: #b6ffb6; font-family: 'VT323', Consolas, monospace; }
.neon .chips span { font-size: 17px; letter-spacing: .06em; color: #33ff33; padding: 0 9px; }
.neon .name { font-size: clamp(52px, 7.4vw, 108px); font-weight: 400; color: #33ff33; text-shadow: 0 0 18px rgba(51,255,51,.65); line-height: .9; }
.neon .tag { font-size: clamp(20px, 1.7vw, 25px); line-height: 1.2; }
.neon .cta { font-size: 22px; font-weight: 400; color: #33ff33; padding: 4px 14px; }
a.neon:hover .cta { background: #33ff33; color: #020a02; }
.neon .art > img { inset: 0 auto auto 0; width: 150%; height: 150%; max-width: none; transform-origin: left top; object-position: left top; -webkit-mask-image: linear-gradient(to right, transparent, #000 22%); mask-image: linear-gradient(to right, transparent, #000 22%); }
.neon::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.22) 0 1px, transparent 1px 3px); }

/* ---------- ShredLoop ---------- */
.shred { background: url(img/tolex.svg), #141414; color: #e8eaf0; font-family: 'Geist', 'Segoe UI', system-ui, sans-serif; }
.shred::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; z-index: 3; background: linear-gradient(to right, #4a90e2, #f2994a); }
.shred .chips span { font-family: Consolas, 'Courier New', monospace; color: #c3cad4; border-color: #4a5262; }
.shred .name { font-weight: 800; letter-spacing: -.02em; }
.shred .name span { background: linear-gradient(to right, #4a90e2, #f2994a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.shred .tag { color: #c3c8d4; }
.shred .cta { background: #c3cad4; border-color: #c3cad4; color: #0e1014; border-radius: 2px; }
a.shred:hover .cta { background: #fff; border-color: #fff; }
.shred .art { display: flex; align-items: center; padding: 10px clamp(8px, 2vw, 32px) 10px 0; }
.shred .art svg { width: 100%; height: 100%; max-height: 300px; }

/* ---------- Fretboard Scale Explorer ---------- */
.fret {
  background: radial-gradient(90% 140% at 20% 0%, rgba(245,158,11,.16), transparent 60%), radial-gradient(70% 120% at 100% 100%, rgba(239,68,68,.12), transparent 60%), #0c0c0f;
  color: #e8e6e3; font-family: 'Geist', 'Segoe UI', system-ui, sans-serif;
}
.fret .chips span { font-family: Consolas, 'Courier New', monospace; color: #f59e0b; border-color: rgba(245,158,11,.55); border-radius: 6px; }
.fret .name { font-size: clamp(32px, 3.9vw, 58px); font-weight: 700; letter-spacing: -.02em; line-height: 1.04; color: #f7b955; }
.fret .name span { display: block; color: #fef9c3; }
.fret .tag { color: #a9a9b3; }
.fret .cta { background: rgba(245,158,11,.14); border-color: #f59e0b; color: #f59e0b; border-radius: 8px; }
a.fret:hover .cta { background: #f59e0b; color: #0c0c0f; }
.fret .art > img {
  inset: auto 0 auto 0; top: 50%; height: 66%; object-position: left center; transform: translateY(-50%); transform-origin: left center;
  border-radius: 8px 0 0 8px; box-shadow: 0 0 0 1px #2a2a32, 0 18px 40px rgba(0,0,0,.6);
}
a.fret:hover .art > img { transform: translateY(-50%) scale(1.03); }

/* ---------- Leapman ---------- */
.leap { background: #40329a; color: #fff; font-family: 'Leapman', 'Courier New', monospace; text-transform: uppercase; border: solid #7c6ed8; border-width: 14px 0; border-bottom: 14px solid #7c6ed8; }
.leap .chips span { font-size: 11px; letter-spacing: 0; border: 0; padding: 4px 7px 3px; background: #c8d37a; color: #40329a; }
.leap .chips span:nth-child(2) { background: #9ce58a; }
.leap .chips span:nth-child(3) { background: #6fc3c9; }
.leap .chips span:nth-child(4) { background: #fff; }
.leap .name { font-size: clamp(34px, 5vw, 72px); font-weight: 400; color: #c8d37a; }
.leap .tag { font-size: clamp(11px, 1vw, 14px); line-height: 1.9; color: #fff; max-width: 44ch; }
.leap .cta { font-size: 12px; font-weight: 400; border: 0; background: #bcb5f2; color: #40329a; padding: 10px 12px 9px; }
a.leap:hover .cta { background: #fff; }
.leap .art { background: #000; border-left: 14px solid #7c6ed8; }
.leap .art > img { image-rendering: pixelated; object-position: center 100%; }

/* ---------- Chess Snacks: web ---------- */
.chess, .chess-ios { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
.chess { background: radial-gradient(120% 140% at 85% 50%, #5a3a22 0%, #38281c 45%, #2a1d14 100%); color: #f0e2cb; }
.chess .chips span { color: #f3cf63; border-color: #8a6a3a; }
.chess .name, .chess-ios .name { font-weight: 800; letter-spacing: -.02em; }
.chess .name span { color: #f3cf63; }
.chess .tag { color: #cdb393; }
.chess .cta { background: #c2702f; border-color: #c2702f; color: #fff; border-radius: 8px; }
a.chess:hover .cta { background: #d98440; border-color: #d98440; }
.chess .art { perspective: 900px; display: grid; place-items: center; }
.chess .art > img {
  inset: auto; left: 50%; top: 50%; width: min(64%, 380px); height: auto; border-radius: 6px;
  transform: translate(-50%, -50%) rotateX(50deg) rotateZ(-24deg) scale(1.45); box-shadow: 0 40px 50px rgba(0,0,0,.55);
}
a.chess:hover .art > img { transform: translate(-50%, -50%) rotateX(50deg) rotateZ(-20deg) scale(1.5); }

/* ---------- Chess Snacks: iOS ---------- */
.chess-ios { background: linear-gradient(115deg, #c2702f 0%, #e39a3d 55%, #f3cf63 100%); color: #2a1d14; }
.chess-ios .chips span { border-color: rgba(42,29,20,.55); }
.chess-ios .name span { color: #fff7e6; }
.chess-ios .tag { color: #3a2614; font-weight: 500; }
.chess-ios .cta { background: #2a1d14; border-color: #2a1d14; color: #fff; border-radius: 8px; }
a.chess-ios:hover .cta { background: #000; border-color: #000; }
.chess-ios .art { --pw: clamp(150px, 15.5vw, 215px); --pg: clamp(14px, 2.4vw, 40px); }
.phone {
  position: absolute; top: 24px; display: block; width: var(--pw); border-radius: 28px; border: 6px solid #1d130b; overflow: hidden; background: #1d130b;
  box-shadow: 0 22px 40px rgba(42,29,20,.5); transition: transform .4s ease;
}
.phone img { width: 100%; height: auto; }
.phone.p1 { left: calc(50% - var(--pw) - var(--pg) / 2); transform: rotate(-6deg); }
.phone.p2 { left: calc(50% + var(--pg) / 2); transform: rotate(5deg) translateY(34px); }
a.chess-ios:hover .p1 { transform: rotate(-6deg) translateY(-10px); }
a.chess-ios:hover .p2 { transform: rotate(5deg) translateY(22px); }

/* ---------- Blues Smoke Detector ---------- */
.smoke { background: #000; color: #fff; font-family: 'Bahnschrift', 'DIN Alternate', 'Arial Narrow', Arial, sans-serif; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.smoke .chips span { border: 0; padding: 4px 10px; background: #fff; color: #000; font-weight: 700; letter-spacing: .14em; }
.smoke .name { font-size: clamp(36px, 4.4vw, 66px); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
.smoke .name span { color: #ff2a1f; }
.smoke .tag { color: #c9c9c9; max-width: 44ch; }
.smoke .tag b { color: #ff2a1f; }
.smoke .cta { background: #ff2a1f; border-color: #ff2a1f; color: #fff; text-transform: uppercase; letter-spacing: .08em; }
a.smoke:hover .cta { background: #fff; border-color: #fff; color: #000; }
.smoke .art > img { object-position: 30% 42%; -webkit-mask-image: linear-gradient(to right, transparent, #000 18%); mask-image: linear-gradient(to right, transparent, #000 18%); }

/* ---------- AI Drone Mega Force ---------- */
.drone {
  background: radial-gradient(120% 160% at 70% 50%, #2c6140 0%, #1d4a2f 50%, #143522 100%);
  color: #f0e2bd; font-family: Verdana, 'Segoe UI', sans-serif;
  border-top: 12px solid #5c3a20; border-bottom: 12px solid #5c3a20; box-shadow: inset 0 2px 0 #7d5330, inset 0 -2px 0 #3d2613;
}
.drone .chips span { font-size: 11px; border-color: rgba(240,226,189,.6); }
.drone .name { font-size: 0; }
.drone .name img { width: min(100%, 560px); height: auto; filter: drop-shadow(0 3px 0 rgba(0,0,0,.45)); }
.drone .tag { font-size: clamp(14px, 1.15vw, 17px); }
.drone .cta { background: #f0e2bd; border-color: #54381e; color: #3a2c18; border-radius: 4px; font-size: 14px; }
a.drone:hover .cta { background: #fff6dc; }
.drone .art > img { -webkit-mask-image: linear-gradient(to right, transparent, #000 16%); mask-image: linear-gradient(to right, transparent, #000 16%); }

/* ---------- Cut-Rate Excursions (coming soon) ---------- */
.cut {
  background: radial-gradient(rgba(255,255,255,.16) 1.6px, transparent 1.9px) 0 0 / 10px 10px, linear-gradient(to bottom, #0060e4, #0071f8);
  color: #fffdf6; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.cut .body { flex-direction: row; justify-content: flex-start; align-items: flex-start; gap: 18px; padding-top: 12px; }
.cut .name { font-size: 0; }
.cut .name img {
  width: auto; height: clamp(120px, 12.5vw, 185px); margin-left: -14px;
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 99%), linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to bottom, #000 80%, transparent 99%), linear-gradient(to right, transparent, #000 6%, #000 94%, transparent); mask-composite: intersect;
}
.cut .name { flex: none; }
.cut .tag { margin-top: 28px; max-width: 26ch; font-weight: 700; font-style: italic; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.cut .art { border-left: 5px solid #141116; }
.cut .art > img { object-position: center 30%; }
.ribbon {
  position: absolute; z-index: 4; left: -6%; right: -6%; top: 77%; transform: translateY(-50%) rotate(-2.4deg);
  display: flex; justify-content: center; padding: 8px 0 9px;
  background: #fad428; color: #141116; border-top: 4px solid #141116; border-bottom: 4px solid #141116;
  box-shadow: 0 8px 0 #d62a22, 0 12px 0 #141116;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', 'Franklin Gothic Heavy', sans-serif;
  font-size: clamp(26px, 3.2vw, 46px); line-height: 1; letter-spacing: .14em; text-transform: uppercase;
}
.ribbon span { display: inline-flex; align-items: center; gap: .5em; transform: skewX(-9deg); }
.ribbon span::before, .ribbon span::after { content: "\2605"; color: #d62a22; font-size: .7em; }

/* ---------- footer ---------- */
footer { padding: 34px clamp(20px, 4vw, 56px) 48px; font-family: 'VT323', Consolas, monospace; font-size: 24px; line-height: 1.1; color: #33ff33; text-shadow: 0 0 10px rgba(51,255,51,.55); }
.cursor { display: inline-block; width: .55em; height: .9em; background: #33ff33; box-shadow: 0 0 10px rgba(51,255,51,.55); vertical-align: -0.1em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* PC only: a phone or a tablet (no hover, or a coarse pointer) shows no footer. terminal.js uses the same media query. */
@media (hover: none), (pointer: coarse) { footer { display: none; } }
/* the footer is a terminal (terminal.js): the output, then the line that the visitor types */
.term { cursor: text; }
.term-out, .term-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.term-line { position: relative; min-height: 1.1em; scroll-margin-bottom: 28px; }
.term-line form { display: inline; }
.term-in { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; font: inherit; cursor: text; }
.term.crash { animation: crash .5s steps(1) 1; }
@keyframes crash {
  0% { transform: translateX(-7px); filter: invert(1); }
  20% { transform: translateX(6px) skewX(-5deg); filter: none; }
  40% { transform: translateX(-4px); }
  60% { transform: translateX(3px) skewX(4deg); }
  80% { transform: translateX(-2px); }
}

/* ---------- narrow screens ---------- */
@media (max-width: 760px) {
  .banner { grid-template-columns: minmax(0, 1fr); }
  .banner .art { order: -1; height: 190px; }
  .neon .art > img { -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }
  .shred .art { padding: 14px 12px 0; height: 170px; }
  .fret .art > img { left: 12px; width: calc(100% - 12px); height: 74%; }
  .leap .art { border-left: 0; border-bottom: 14px solid #7c6ed8; }
  .chess .art { overflow: hidden; }
  .chess-ios .art { height: 250px; overflow: hidden; }
  .cut .art { border-left: 0; border-bottom: 5px solid #141116; }
  .cut .body { flex-direction: column; padding-top: 48px; gap: 10px; }
  .cut .tag { margin-top: 0; max-width: 50ch; }
  .ribbon { top: 192px; }
  .chess-ios .art { --pw: 150px; }
  .drone .art > img { -webkit-mask-image: none; mask-image: none; }
  .smoke .art > img { -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent); mask-image: linear-gradient(to bottom, #000 70%, transparent); }
  .bar nav { gap: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
