/* jonmcgee.online
   Type: Big Shoulders (stencil + display) / Hanken Grotesk / Martian Mono
   Palette: graphite ground, bone text, one vermilion signal. Each game borrows its own colour. */

:root {
  --ground: #0f100e;
  --ground-2: #151613;
  --panel: #1b1c19;
  --line: #2d2f2a;
  --bone: #ede8db;
  --bone-dim: #a8a396;
  --signal: #ff4a1c;
  --ink: #170603;

  --f-stencil: "Big Shoulders Stencil Display", "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --f-display: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --f-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 1360px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
  background: var(--ground);
  color: var(--bone);
  font: 400 1.0625rem/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--signal); color: var(--ink); }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--bone); color: var(--ink); padding: .6rem 1rem; border-radius: 6px; z-index: 100; }
.skip:focus { top: 1rem; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 4.25rem; padding: 0 var(--gutter);
  background: var(--ground);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; font: 800 1.5rem/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; }
.brand img { border-radius: 10px; }
#nav { display: flex; gap: .25rem; }
#nav a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; font: 500 .9375rem/1 var(--f-body); padding: .7rem 1rem; border-radius: 999px; color: var(--bone-dim); transition: color .2s, background-color .2s; }
#nav a:hover { color: var(--bone); background: var(--panel); }
#nav a[aria-current="true"] { color: var(--ink); background: var(--bone); }
.menu-btn { display: none; align-items: center; min-height: 44px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: .55rem 1.2rem; font-weight: 500; }

/* ---------- shared ---------- */
section, .foot { padding-inline: var(--gutter); }
.sec-head, .arcade, .feature, .rows, .hero, .about { max-width: var(--max); margin-inline: auto; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 3rem; margin-bottom: 3rem; }
.sec-head h2, .about h2 { font: 900 clamp(4rem, 9vw, 8rem)/.85 var(--f-stencil); text-transform: uppercase; letter-spacing: .01em; }
.sec-head p { max-width: 38ch; color: var(--bone-dim); }
.meta { font: 400 .8125rem/1.4 var(--f-mono); color: var(--bone-dim); letter-spacing: .01em; }
.stamp { font: 500 .9375rem/1.3 var(--f-mono); display: inline-block; padding: .55rem .9rem; border: 1.5px solid currentColor; border-radius: 6px; transform: rotate(-1.5deg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-decoration: none; font: 600 1rem/1 var(--f-body); padding: 1rem 1.6rem; border-radius: 999px; border: 1.5px solid transparent; transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--signal); color: var(--ink); }
.btn-solid:hover { background: var(--bone); }
.btn-line { border-color: var(--bone-dim); color: var(--bone); background: none; }
.btn-line:hover { border-color: var(--bone); background: var(--bone); color: var(--ink); }
.btn-lg { font-size: 1.125rem; padding: 1.15rem 2.1rem; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: clamp(1rem, 4vw, 4rem); padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(4rem, 9vw, 8rem); }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { font: 900 clamp(5.5rem, 15.5vw, 15rem)/.86 var(--f-stencil); text-transform: uppercase; letter-spacing: .005em; display: flex; flex-direction: column; margin-bottom: 2.25rem; }
.hero h1 span { display: block; animation: rise 1s var(--ease) both; }
.hero h1 span:nth-child(2) { animation-delay: .09s; color: var(--signal); }
.hero .stamp { color: var(--signal); margin-bottom: 1.5rem; animation: rise 1s .22s var(--ease) both; }
.hero .lede { max-width: 44ch; font-size: 1.1875rem; color: var(--bone); margin-bottom: 2rem; animation: rise 1s .3s var(--ease) both; }
.cta { display: flex; flex-wrap: wrap; gap: .75rem; animation: rise 1s .38s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }

.portrait { --x: 50%; --y: 40%; position: relative; margin: 0; justify-self: end; width: min(100%, 31rem); aspect-ratio: 332 / 477; background: #f3f0e8; border-radius: 18px; overflow: hidden; animation: rise 1.2s .15s var(--ease) both; touch-action: manipulation; cursor: crosshair; }
.p-swoosh { position: absolute; left: 0; bottom: 0; width: 100%; height: 25%; }
.p-line, .p-photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.p-line { background: #86857f; -webkit-mask: url(../assets/line-mask.png) center / 100% 100% no-repeat; mask: url(../assets/line-mask.png) center / 100% 100% no-repeat; }
.p-photo { object-fit: cover; clip-path: circle(0 at var(--x) var(--y)); transition: clip-path .45s var(--ease); pointer-events: none; }
.portrait.peek .p-photo { clip-path: circle(22% at var(--x) var(--y)); }
.portrait.show-photo .p-photo { clip-path: circle(110% at 50% 50%); }
.portrait::after { content: ""; position: absolute; left: var(--x); top: var(--y); width: 44%; aspect-ratio: 1; border: 2px solid #f3f0e8; border-radius: 50%; transform: translate(-50%, -50%) scale(.3); opacity: 0; transition: opacity .3s, transform .45s var(--ease); pointer-events: none; }
.portrait.peek::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.portrait.show-photo::after { opacity: 0; }
.portrait figcaption { position: absolute; left: 0; right: 0; bottom: .9rem; text-align: center; font: 400 .8125rem/1 var(--f-mono); color: #6b6a65; transition: opacity .25s; }
.portrait.peek figcaption { opacity: 0; }
.portrait.show-photo figcaption { left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: 90%; padding: .55rem .8rem; border-radius: 999px; background: rgba(15, 16, 14, .78); color: var(--bone); }

/* ---------- play ---------- */
.play { padding-block: clamp(4rem, 9vw, 8rem); background: var(--ground-2); border-block: 1px solid var(--line); }
.arcade { display: grid; grid-template-columns: minmax(16rem, 21rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.picker { display: flex; flex-direction: column; gap: .75rem; }
.pick { text-align: left; display: flex; flex-direction: column; gap: .35rem; padding: 1.25rem 1.4rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; transition: background-color .25s, color .25s, border-color .25s; }
.pick-name { font: 800 2.25rem/1 var(--f-display); text-transform: uppercase; letter-spacing: .015em; }
.pick-sub { font-size: .9375rem; line-height: 1.4; color: var(--bone-dim); transition: color .25s; }
.pick:hover { border-color: var(--g); }
.pick[aria-selected="true"] { background: var(--g); border-color: var(--g); color: var(--ink); }
.pick[aria-selected="true"] .pick-sub { color: var(--ink); }

.cab { background: #0a0a09; border: 1px solid var(--line); border-radius: 14px; padding: .75rem; }
.cab-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .35rem .6rem .8rem; }
.cab-title { font: 900 2rem/1 var(--f-stencil); text-transform: uppercase; color: var(--g, var(--signal)); letter-spacing: .02em; }
.cab-note { font: 400 .8125rem/1.3 var(--f-mono); color: var(--bone-dim); text-align: right; }
.screen { position: relative; aspect-ratio: 9 / 7; min-height: 28rem; border-radius: 8px; overflow: hidden; background: #000; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.screen iframe[hidden] { display: none; }
.poster { position: absolute; inset: 0; display: flex; align-items: flex-end; background: var(--ground); }
.poster picture { display: block; position: absolute; inset: 0; }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.42) saturate(.9); }
.poster.no-art { background: var(--g); }
.poster.no-art img { display: none; }
.poster.no-art::before { content: attr(data-title); position: absolute; left: clamp(1.25rem, 3vw, 2.5rem); top: clamp(.5rem, 2vw, 1.5rem); font: 900 clamp(5rem, 14vw, 12rem)/.85 var(--f-stencil); text-transform: uppercase; color: var(--ink); opacity: .9; }
.poster-body { position: relative; margin: clamp(.75rem, 2vw, 1.5rem); padding: clamp(1.1rem, 2.5vw, 1.75rem); display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; background: rgba(15, 16, 14, .92); border-radius: 12px; max-width: 30rem; }
.poster-blurb { max-width: 36ch; font-size: 1.25rem; line-height: 1.45; color: var(--bone); }
.poster.no-art .poster-blurb, .poster.no-art .poster-hint { color: var(--ink); }
.poster-hint { font: 400 .8125rem/1.4 var(--f-mono); color: var(--bone-dim); }
#start { background: var(--g); color: var(--ink); }
#start:hover { background: var(--bone); }
#start:disabled { background: var(--panel); color: var(--bone-dim); cursor: not-allowed; }
.poster.no-art #start:disabled { background: var(--ink); color: var(--bone); }
.cab-bar { display: flex; flex-wrap: wrap; gap: .5rem; padding: .8rem .35rem .3rem; }
.tool { display: inline-flex; align-items: center; min-height: 44px; font: 500 .8125rem/1 var(--f-mono); padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); text-decoration: none; transition: border-color .2s, background-color .2s, color .2s; }
.tool:hover:not(:disabled):not([aria-disabled="true"]) { border-color: var(--bone); }
.tool:disabled, .tool[aria-disabled="true"] { color: #75726a; cursor: not-allowed; }
.tool-link { margin-left: auto; }

/* ---------- work ---------- */
.work { padding-block: clamp(4rem, 9vw, 8rem); }
.feature { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding-bottom: clamp(3rem, 6vw, 5rem); margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.feature.flip { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); }
.feature.flip .feature-info { order: 2; }
#pci h3 { font-size: clamp(2.6rem, 4.6vw, 4.25rem); }
.feature h3 { font: 900 clamp(3.25rem, 6.4vw, 6rem)/.9 var(--f-stencil); text-transform: uppercase; margin: .6rem 0 1.25rem; }
.feature-info p:not(.meta) { max-width: 46ch; color: var(--bone-dim); margin-bottom: 1.75rem; }
.browser { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.browser-top { display: flex; align-items: center; gap: .45rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.browser-top i { width: .65rem; height: .65rem; border-radius: 50%; background: var(--line); }
.browser-top .url { margin-left: .6rem; font: 400 .8125rem/1 var(--f-mono); color: var(--bone-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.browser-top .lock { margin-left: auto; flex: none; font: 500 .8125rem/1 var(--f-mono); padding: .4rem .65rem; border-radius: 999px; background: var(--signal); color: var(--ink); }
.browser-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0d14 center / cover no-repeat; --s: .5; }
.browser-view iframe { position: absolute; left: 0; top: 0; width: var(--vw, 1280px); height: var(--vh, 800px); border: 0; transform: scale(var(--s)); transform-origin: 0 0; background: #fff; }
.shield { position: absolute; inset: 0; cursor: not-allowed; }
.toast { position: absolute; left: 50%; bottom: 1rem; transform: translate(-50%, 1rem); background: var(--bone); color: var(--ink); font: 600 .9375rem/1.3 var(--f-body); padding: .75rem 1.1rem; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .35s var(--ease); white-space: nowrap; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.rows { list-style: none; padding: 0; margin-block: 0; }
.row { border-bottom: 1px solid var(--line); }
.row-link { display: grid; grid-template-columns: 15rem minmax(0, 1fr) auto; gap: clamp(1rem, 3vw, 2.5rem); align-items: center; padding: 1.75rem 0; }
.thumb { aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; text-align: center; }
.row-body h3 { font: 800 clamp(2.25rem, 4vw, 3.25rem)/.95 var(--f-display); text-transform: uppercase; letter-spacing: .01em; margin: .35rem 0 .6rem; transition: color .2s; }
.row-body p:not(.meta) { max-width: 56ch; color: var(--bone-dim); }
.row-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.row-go { text-decoration: none; font: 500 .9375rem/1 var(--f-body); white-space: nowrap; padding: .9rem 1.3rem; border: 1.5px solid var(--line); border-radius: 999px; transition: background-color .2s, color .2s, border-color .2s; }
.row-go i { font-style: normal; display: inline-block; transition: transform .25s var(--ease); }
.row-body h3 a { text-decoration: none; transition: color .2s; }
.row-body h3 a:hover { color: var(--signal); }
.thumb-img { display: block; position: relative; }
.thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.feature-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.row-go:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.row-go:hover i { transform: translate(2px, -2px); }


.tile-forge { background: #0d1117; }
.tile-forge b { font: 700 .8125rem/1 Georgia, "Times New Roman", serif; letter-spacing: .12em; text-transform: uppercase; color: #c8aa6e; }
.tile-wacky { background: #0a0c0b; gap: .1rem; }
.tile-wacky b { font: 800 2.4rem/.85 var(--f-display); text-transform: uppercase; color: #d6f94f; }
.tile-wacky span { font: 400 .75rem/1 var(--f-mono); color: #f4f7f4; }
.tile-git { background: var(--panel); border: 1px solid var(--line); gap: .35rem; }
.git-face { height: 74%; aspect-ratio: 332 / 477; background: var(--bone-dim); -webkit-mask: url(../assets/line-mask.png) center / contain no-repeat; mask: url(../assets/line-mask.png) center / contain no-repeat; }
.tile-git span { font: 400 .8125rem/1 var(--f-mono); color: var(--bone-dim); }

/* ---------- about ---------- */
.about { max-width: none; padding-block: clamp(4rem, 8vw, 7rem); background: var(--signal); color: var(--ink); display: grid; grid-template-columns: minmax(0, 21rem) minmax(0, 40rem); justify-content: center; align-items: center; gap: clamp(2rem, 7vw, 7rem); }
.about-art { width: 100%; }
.about-face { aspect-ratio: 332 / 477; background: var(--ink); -webkit-mask: url(../assets/line-mask.png) center / 100% 100% no-repeat; mask: url(../assets/line-mask.png) center / 100% 100% no-repeat; }
.about-copy p { font-size: 1.25rem; line-height: 1.55; max-width: 38ch; font-weight: 500; }
.about h2 { margin-bottom: 1.75rem; }
.about-copy p + p { margin-top: 1rem; }
.stamp-sm { margin-top: 2rem; font-size: .875rem; }
.about-copy .stamp { max-width: none; font-weight: 500; font-size: .875rem; }

/* ---------- footer ---------- */
.foot { padding-block: 3rem calc(2rem + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
.foot-mark { font: 900 clamp(3rem, 11.4vw, 12rem)/.8 var(--f-stencil); color: var(--panel); white-space: nowrap; letter-spacing: .01em; margin-bottom: 2.5rem; user-select: none; }
.foot-row { max-width: var(--max); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.foot nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.foot nav a { color: var(--bone-dim); text-decoration: none; padding: .75rem .5rem; margin-inline: -.25rem; display: inline-block; transition: color .2s; }
.foot nav a:hover { color: var(--bone); }
.foot p { color: var(--bone-dim); font-size: .9375rem; }

/* ---------- dialog ---------- */
dialog { width: min(96vw, 1400px); max-height: 94vh; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--bone); overflow: hidden; }
dialog::backdrop { background: rgba(8, 8, 7, .86); }
.dlg-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .8rem .6rem 1.1rem; border-bottom: 1px solid var(--line); font: 500 .8125rem/1 var(--f-mono); }
.dlg-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-view { aspect-ratio: 16 / 10; max-height: calc(94vh - 3.5rem); width: 100%; margin-inline: auto; }
.dlg-bar .tool { min-height: 40px; }

/* ---------- reveal (enhancement only) ---------- */
.will-reveal:not(.in) { opacity: 0; transform: translateY(28px); }
.will-reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-bottom: 5rem; }
  .portrait { justify-self: center; width: min(78%, 24rem); margin-bottom: 1.5rem; }
  .arcade, .feature, .feature.flip { grid-template-columns: 1fr; }
  .feature.flip .feature-info { order: 0; }
  .picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .picker::-webkit-scrollbar { display: none; }
  .pick { min-width: 0; padding: 1rem 1.1rem; }
  .row-link { grid-template-columns: 11rem minmax(0, 1fr); }
  .row-actions { grid-column: 2; justify-content: flex-start; }
  .about { grid-template-columns: 1fr; }
  .about-art { max-width: 13rem; }
}
@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  #nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: .75rem var(--gutter) 1.25rem; background: var(--ground); border-bottom: 1px solid var(--line); display: none; }
  #nav.open { display: flex; }
  #nav a { padding: 1rem; font-size: 1.0625rem; }
  .sec-head p { max-width: none; }
  .screen { aspect-ratio: auto; height: min(78vh, 40rem); height: min(78dvh, 40rem); min-height: 0; }
  .cab-note { display: none; }
  .row-link { grid-template-columns: 1fr; gap: 1rem; }
  .thumb { aspect-ratio: 16 / 9; }
  .row-actions { grid-column: 1; }
  .tool-link { margin-left: 0; }
  .toast { white-space: normal; width: max-content; max-width: 88%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}



/* ---------- phone refinements ---------- */
@media (max-width: 720px) {
  .bar { height: 4rem; }
  .brand { font-size: 1.375rem; }
  .hero { padding-top: 1.5rem; }
  .hero h1 { margin-bottom: 1.5rem; }
  .stamp { font-size: .8125rem; }
  .cta .btn { flex: 1 1 auto; }
  .sec-head { margin-bottom: 2rem; }
  .browser-view { aspect-ratio: 4 / 5; }
  .feature-actions .btn { flex: 1 1 auto; }
  .poster-body { max-width: none; margin-top: auto; }
  .poster { align-items: stretch; }
  .poster img { filter: brightness(.7); object-position: 50% 0; }
  .poster-blurb { font-size: 1.125rem; }
  .cab-bar .tool { flex: 1 1 auto; justify-content: center; }
  .tool-link { flex-basis: 100%; }
  .row-actions .row-go { flex: 1 1 auto; text-align: center; }
  dialog { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; border: 0; border-radius: 0; }
  .dlg-view { aspect-ratio: auto; max-height: none; height: calc(100vh - 3.5rem); height: calc(100dvh - 3.5rem); overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background-image: none !important; }
  .dlg-view iframe { position: relative; transform: none; display: block; }
  .dlg-view .shield { display: none; }
  .about { gap: 1.5rem; }
  .about-copy p { font-size: 1.125rem; }
  .foot-mark { margin-bottom: 1.5rem; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 5.25rem; }
  .pick-name { font-size: 1.7rem; }
  .row-body h3 { font-size: 2.1rem; }
}
@media (hover: none) {
  .portrait { cursor: pointer; }
}