/* Just One More JOIN, standalone: Los Angeles after dark, 1974. The cream
   and ember of the title, a spiral notebook's paper and blue rules, and the
   green bars of printout paper, from lieutenant/core/palette.gd, with the
   game's fat seventies serif (Caprasimo) for headings. */

:root {
  color-scheme: dark;
  --ink: #17120f;
  --night: #211a20;
  --panel: #2a2019;
  --line: #5c4533;
  --cream: #fce6ad;
  --ember: #f08033;
  --paper: #f5edd6;
  --dim: #c4b8a6;
  --rule: #99bbdb;
  --bar: #d1ead1;
  --gutter: 16px;
  --display: "Caprasimo", Georgia, serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body.jj { margin: 0; background: var(--ink); color: var(--paper); font: 1.0625rem/1.6 var(--body); }
.jj img { max-width: 100%; height: auto; display: block; }
.jj a { color: var(--ember); }
.jj a:hover { color: var(--cream); }
.jj :focus-visible { outline: 3px solid var(--rule); outline-offset: 2px; }
.jj h1, .jj h2, .jj h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0 0 0.5em; }
.jj h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--cream); }
.jj h3 { font-size: 1.4rem; color: var(--cream); }
.jj code { font-family: var(--mono); font-size: 0.92em; color: var(--cream); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ember); color: var(--ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* The bar */
.jj-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 10px var(--gutter);
  background: rgba(23, 18, 15, 0.94); border-bottom: 2px solid var(--ember); backdrop-filter: blur(6px); }
.jj-brand { font: 400 1.25rem var(--display); color: var(--cream) !important; text-decoration: none; white-space: nowrap; }
.jj-bar nav { display: flex; gap: 16px; margin-left: auto; overflow-x: auto; }
.jj-bar nav a { color: var(--dim); text-decoration: none; white-space: nowrap; font-size: 0.95rem; }
.jj-bar nav a:hover { color: var(--paper); }

/* Buttons */
.jj-btn { display: inline-block; font: 400 1.3rem var(--display); color: var(--ink) !important; background: var(--ember);
  text-decoration: none; padding: 12px 22px; border: 2px solid var(--cream); box-shadow: 0 4px 0 #8a4416; }
.jj-btn:hover { background: var(--cream); }
.jj-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8a4416; }
.jj-btn-small { padding: 5px 14px; font-size: 1.05rem; box-shadow: none; }
.jj-more { margin-left: 18px; font: 400 1.15rem var(--display); white-space: nowrap; }

/* The hero */
.jj-hero { max-width: 1100px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) 24px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.jj-kicker { font: 700 0.8rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--rule); margin: 0 0 16px; }
.jj-hero h1 { font-size: clamp(3.4rem, 9vw, 6rem); color: var(--ember); margin-bottom: 0.3em; }
.jj-hero h1 span { display: block; font-size: 0.52em; color: var(--cream); }
.jj-lede { font-size: clamp(1.1rem, 2.2vw, 1.25rem); margin: 0 0 24px; }
.jj-actions { margin: 0 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 0; }
.jj-fine { color: var(--dim); font-size: 0.9rem; margin: 0; }
.jj-shot { border: 2px solid var(--line); width: 100%; }
@media (max-width: 860px) { .jj-hero { grid-template-columns: 1fr; } }

/* Sections */
.jj-section { max-width: 1100px; margin: 0 auto; padding: 44px var(--gutter); }
.jj-section > p { max-width: 46em; }
.jj-intro { color: var(--dim); }
.jj-steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.jj-steps li { background: var(--panel); border: 2px solid var(--line); }
.jj-steps img { width: 100%; border-bottom: 2px solid var(--line); }
.jj-steps h3 { margin: 16px 16px 6px; }
.jj-steps p { margin: 0 16px 18px; color: var(--dim); font-size: 0.98rem; }
@media (max-width: 860px) { .jj-steps { grid-template-columns: 1fr; } }
.jj-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
@media (max-width: 860px) { .jj-pair { grid-template-columns: 1fr; } }

/* The cases: a manila folder each, its cards on notebook paper */
.jj-cases { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 20px; }
.jj-case { background: var(--panel); border: 2px solid var(--line); border-top: 6px solid #dbbd80; padding: 20px; min-width: 0; }
.jj-num { font: 700 0.75rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--rule); margin: 0 0 8px; }
.jj-case h3 { margin-bottom: 4px; font-size: 1.7rem; }
.jj-sql { margin: 0 0 10px; }
.jj-sql code { color: var(--ember); }
.jj-who { margin: 0 0 16px; color: var(--dim); }
.jj-who b { color: var(--paper); }
.jj-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.jj-card { margin: 0; background: #fbf3d9; color: #24243d; border: 1px solid #c9b98c; min-width: 0; }
.jj-card figcaption { font: 400 1.05rem var(--display); color: var(--cream); background: #4c3324; padding: 8px 12px; }
.jj-card pre { margin: 0; padding: 12px; overflow-x: auto; font: 0.85rem/1.55 var(--mono); border-bottom: 1px solid #99bbdb; }
.jj-card pre code { font-size: inherit; color: #24243d; }
.jj-card .k { color: #38339e; font-weight: 600; }
.jj-card .s { color: #1f7033; }
.jj-card p { margin: 0; padding: 12px; font-size: 0.95rem; line-height: 1.5; }

.jj-real figure { margin: 20px 0 0; max-width: 46em; }

/* Lists of people, clauses and keys */
.jj-cast, .jj-next, .jj-keys { list-style: none; padding: 0; margin: 16px 0 24px; max-width: 46em; }
.jj-cast li, .jj-next li, .jj-keys li { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 12em 1fr; gap: 12px; }
.jj-cast b, .jj-keys b { color: var(--cream); }
.jj-cast span, .jj-next span, .jj-keys span { color: var(--dim); }
@media (max-width: 560px) { .jj-cast li, .jj-next li, .jj-keys li { grid-template-columns: 1fr; gap: 2px; } }

/* The foot */
.jj-foot { border-top: 2px solid var(--ember); margin-top: 32px; padding: 28px var(--gutter) 40px; text-align: center; color: var(--dim); font-size: 0.95rem; }
.jj-foot p { max-width: 60em; margin: 0 auto 8px; }

/* The trailer (static/trailer.js): its thumbnail until clicked, then the player */
.jj .trailer { position: relative; display: block; margin: 20px 0 12px; aspect-ratio: 16 / 9; border: 2px solid var(--line); background: var(--ink); }
.jj .trailer img, .jj .trailer iframe { display: block; width: 100%; height: 100%; border: 0; image-rendering: pixelated; }
.jj .trailer-play { position: absolute; left: 50%; top: 50%; width: 88px; height: 62px; transform: translate(-50%, -50%); background: var(--ember); box-shadow: 0 5px 0 #8a3f10; }
.jj .trailer-play::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: 14px 0 14px 24px; border-color: transparent transparent transparent var(--ink); }
.jj .trailer:hover .trailer-play, .jj .trailer:focus-visible .trailer-play { background: var(--cream); }
.jj .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
