/* Shared styles for the gallery site: index.html, view.html, setup.html, play.html */
:root {
  color-scheme: dark;
  --bg: #111214; --surface: #191B1E; --surface-2: #202327; --line: #2B2F35; --line-2: #3A3F46;
  --ink: #ECE9E2; --ink-2: #CFCCC4; --mut: #A2A19B; --faint: #6F706C;
  --violet: #C3B5E8; --amber: #F2D98B; --blue: #9CC3E6; --green: #A8DDC3; --red: #EBA494;
  --hand: 'Caveat', cursive; --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --wrap: 1180px; --gut: 28px; --r: 14px;
}
* { box-sizing: border-box }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100% }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: var(--blue); text-underline-offset: 3px }
a:hover { color: #C4DCF2 }
img { max-width: 100%; display: block }
code, kbd, pre { font-family: var(--mono); font-size: .9em }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere }
pre { background: #0C0D0F; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; line-height: 1.5; margin: 12px 0 }
pre code { background: none; border: 0; padding: 0 }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut) }
.wrap > *, .grid > *, .cols > * { min-width: 0 }
@media (max-width: 720px) { :root { --gut: 16px } body { font-size: 15.5px } }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line) }
.top .wrap { display: flex; align-items: center; gap: 22px; height: 60px }
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--ink); text-decoration: none; white-space: nowrap }
.brand b { font: 700 27px/1 var(--hand); letter-spacing: .2px }
.brand span { font-size: 12.5px; color: var(--mut) }
.top nav { display: flex; gap: 4px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none }
.top nav::-webkit-scrollbar { display: none }
.top nav a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; padding: 7px 11px; border-radius: 8px; white-space: nowrap }
.top nav a:hover, .top nav a[aria-current=page] { background: var(--surface-2); color: var(--ink) }
@media (max-width: 720px) { .brand span { display: none } .brand b { font-size: 24px } .top .wrap { gap: 8px } .top nav a { padding: 7px 7px; font-size: 14px } .top nav .wide { display: none } }

/* type */
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 650; letter-spacing: -.01em }
h1 { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -.02em }
h2 { font-size: clamp(25px, 3vw, 34px) }
h3 { font-size: 19px }
.hand { font-family: var(--hand); font-weight: 700; letter-spacing: .2px }
.lede { font-size: clamp(17px, 1.6vw, 19.5px); color: var(--ink-2); line-height: 1.6; max-width: 66ch }
.mut { color: var(--mut) }
.kicker { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); font-weight: 600; margin: 0 0 10px }
.prose { max-width: 70ch } .prose p { margin: 0 0 14px } .prose p:last-child { margin-bottom: 0 }
section { padding: 64px 0 }
section + section { border-top: 1px solid var(--line) }
@media (max-width: 720px) { section { padding: 44px 0 } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--ink); background: var(--surface-2); text-decoration: none; font: 600 15px/1 var(--sans); cursor: pointer }
.btn:hover { border-color: var(--mut); color: var(--ink) }
.btn.pri { background: var(--violet); border-color: var(--violet); color: #17151D }
.btn.pri:hover { background: #D3C8F0; color: #17151D }
.btn:focus-visible, a:focus-visible, button:focus-visible, textarea:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center }

/* explainer frames */
/* the explainer page inside has its own card and a 16px margin, so the frame adds no border and lines the card up with the text */
.frame { margin: 0 -16px }
.frame iframe { display: block; width: 100%; height: 640px; border: 0; background: transparent }
.frame-note { font-size: 13.5px; color: var(--mut); margin: 2px 0 0 }

/* cards */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 620px) { .grid { grid-template-columns: minmax(0, 1fr); gap: 16px } }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s }
.card:hover { border-color: var(--line-2); transform: translateY(-2px); color: var(--ink) }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none } }
.card .shot { aspect-ratio: 16 / 10; background: #1E2023; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line) }
.card .shot img { width: 100%; height: 100%; object-fit: contain }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1 }
.card h3 { font-size: 17.5px; line-height: 1.3 }
.card p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55 }
.card .meta { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--mut) }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 10px; white-space: nowrap }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none }

/* two columns */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start }
@media (max-width: 860px) { .cols { grid-template-columns: minmax(0, 1fr); gap: 24px } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px }
@media (max-width: 720px) { .panel { padding: 18px 16px } }
.panel h3 { margin-bottom: 8px }
.panel p { margin: 0 0 10px; color: var(--ink-2) } .panel p:last-child { margin-bottom: 0 }

table { border-collapse: collapse; width: 100%; font-size: 14.5px }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top }
th { color: var(--mut); font-weight: 600; font-size: 13px }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r) }
.tablewrap table th:first-child, .tablewrap table td:first-child { padding-left: 16px }

footer { border-top: 1px solid var(--line); padding: 34px 0 48px; color: var(--mut); font-size: 14px }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between }
