/* grimeethics.net. See docs/DESIGN.md. One typeface, black, the posters are the color. */

@font-face { font-family: Jost; src: url(/assets/fonts/jost.woff2) format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: Jost; src: url(/assets/fonts/jost-italic.woff2) format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }

:root {
  --black: #000;
  --screen: #f2f1ec;
  --dim: #9b9a93;
  --dimmer: #5c5b56;
  --grime: #93cb00;
  --poster: #e4551c;
  --line: #2a2a27;
  --inset: 0px;

  /* The engine's variables (site.css reads these), always the dark room. */
  --bg: var(--black) !important;
  --background: var(--black) !important;
  --foreground: var(--screen) !important;
  --text-copy: #d9d8d2 !important;
  --text-heading: var(--screen) !important;
  --text-secondary: #bdbcb5 !important;
  --text-nav: var(--dim) !important;
  --text-nav-hover: var(--screen) !important;
  --text-link: var(--screen) !important;
  --line-subtle: var(--line) !important;
  --surface-subtle: #0f0f0e !important;
  --code-background: #111 !important;
  --accent: var(--grime) !important;
  --font-reading: Jost, "Futura", "Avenir Next", system-ui, sans-serif !important;
  --font-ui: Jost, "Futura", "Avenir Next", system-ui, sans-serif !important;
  --hue-1: #c9a39d; --hue-2: #a5c49e; --hue-3: #9fb6d1; --hue-4: #cdc492; --hue-5: #d8a37a; --hue-6: #bba8d1; --hue-7: #93c0bc; --hue-8: #c9a0bd;
}
html { background: var(--black); color-scheme: dark; }
body { font-size: 17px; line-height: 1.55; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
::selection { background: var(--grime); color: var(--black); }
:focus-visible { outline: 2px solid var(--grime); outline-offset: 3px; }

/* Shell and column. */
.site-shell { --page-pad: clamp(1.1rem, 3vw, 2.5rem); padding-top: 0; }
.content-frame { --content-width: 720px; }
.content-frame .content-paragraph, .content-frame .content-blockquote p { max-width: 70ch; font-size: 17px; line-height: 1.55; margin: 0 0 1.3rem; }
.content-frame a.content-link, .content-frame a { color: var(--screen); text-decoration: underline; text-decoration-color: var(--dimmer); text-decoration-thickness: 1px; text-underline-offset: .18em; }
.content-frame a:hover { text-decoration-color: var(--screen); }
.content-heading, .content-frame h2 { font-family: Jost, sans-serif; font-weight: 500; font-size: 1.35rem; letter-spacing: -.005em; margin: 2.6rem 0 .8rem; color: var(--screen); }
.content-frame h3.content-heading { font-weight: 500; font-size: 1.1rem; margin: 2rem 0 .6rem; }
.content-title { font-family: Jost, sans-serif; font-weight: 500; font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -.01em; line-height: 1.1; margin: 0 0 .5rem; color: var(--screen); }
.content-frame .content-subtitle { display: block; margin: 0 0 1.6rem; color: var(--dim); font-size: 1.05rem; font-style: normal; }
.content-blockquote { border-left: 1px solid var(--line); color: var(--text-secondary); }
.content-frame .content-blockquote > p:last-child:has(> em:only-child) { color: var(--dim); font-size: .9em; margin-top: -.8rem; }
/* A plain bleed: as wide as the shell. */
.bleed { width: 100cqi; margin-inline: calc((100% - 100cqi) / 2); }

/* Header: the mark, the wordmark, three links. On the home page the hero carries the mark instead. */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; max-width: 1100px; margin: 0 auto; padding: 1.1rem 0 1.6rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--screen); text-decoration: none; }
.brand-mark { display: block; width: 30px; height: 30px; }
.wordmark { font-family: Jost, sans-serif; font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.site-nav { display: flex; gap: 1.4rem; font-size: 15px; white-space: nowrap; }
.site-nav a { color: var(--dim); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--screen); }
.site-head.is-home .brand { visibility: hidden; }
@media (max-width: 520px) { .site-head { gap: 1rem; } .site-head .brand .wordmark { display: none; } .site-nav { gap: 1rem; font-size: 14px; } }

/* Home hero: the title card, then the street. */
.hero { text-align: center; padding: 2.5rem 0 2.2rem; }
.hero-mark { display: block; width: 84px; height: 84px; margin: 0 auto 1.3rem; }
.hero .wordmark { display: block; font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: .08em; }
.content-frame .hero-tagline { margin: 1rem auto 0; max-width: 32ch; color: var(--screen); font-weight: 300; font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.35; }
.content-frame .hero-line { margin: .6rem auto 0; max-width: 44ch; color: var(--dim); font-size: 16px; line-height: 1.45; }
.strip { overflow: hidden; margin-block: 1.2rem 3rem; }
.strip-track { display: flex; gap: 6px; width: max-content; animation: strip-drift 80s linear infinite; }
.strip:hover .strip-track, .strip:focus-within .strip-track, .strip:active .strip-track { animation-play-state: paused; }
.strip:focus-visible { outline-offset: -2px; }
/* Touch screens: no drift; swipe it instead. */
@media (hover: none) { .strip { overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; } .strip-track { animation: none; } .strip img { scroll-snap-align: start; } .strip .dup { display: none; } }
.strip img { display: block; width: clamp(150px, 20vw, 240px); aspect-ratio: 1; object-fit: cover; }
@keyframes strip-drift { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .strip { overflow-x: auto; } .strip-track { animation: none; } .strip .dup { display: none; } }

/* Sections on the home page and the screenings list: sentence-case headings, no eyebrows. */
.block { margin: 0 0 3rem; }
.block > h2 { font-weight: 500; font-size: 1rem; color: var(--dim); margin: 0 0 .9rem; }
.block .content-paragraph { max-width: 60ch; }

/* A screening in a list: the poster small on the left, the date large. */
.card { display: grid; grid-template-columns: 150px 1fr; gap: 1.5rem; align-items: start; margin: 0 0 2.2rem; }
.card-poster { display: block; }
.card-poster img { display: block; width: 100%; height: auto; }
.card.no-poster { grid-template-columns: 1fr; }
.content-frame .date { font-weight: 300; font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.15; letter-spacing: -.01em; color: var(--screen); margin: 0 0 .35rem; text-wrap: balance; }
.content-frame .card-title { font-weight: 500; font-size: 1.3rem; line-height: 1.3; margin: 0 0 .35rem; }
.card-title a { color: var(--screen); text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-decoration-color: var(--dimmer); text-underline-offset: .18em; }
.card-maker { font-weight: 400; color: var(--dim); }
.content-frame .card-hook { margin: 0 0 .5rem; color: var(--text-copy); font-size: 17px; line-height: 1.5; max-width: 55ch; }
.content-frame .card-facts { margin: 0; color: var(--dim); font-size: 15px; line-height: 1.5; }
.content-frame .notice { margin: .5rem 0; color: var(--poster); font-weight: 500; font-size: 15px; }
.content-frame .ticket { margin: .6rem 0 0; font-size: 15px; color: var(--dim); }
.content-frame a.see-link { color: var(--screen); font-weight: 500; white-space: nowrap; }
.content-frame a.ticket-link { color: var(--grime); text-decoration: none; font-weight: 500; }
.content-frame a.ticket-link:hover { text-decoration: underline; text-underline-offset: .18em; }
@media (max-width: 560px) { .card { grid-template-columns: 110px 1fr; gap: 1rem; } }

/* The screening page: poster beside the words, sticky; the flyer frame for the facts. */
.screening { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 3rem; align-items: start; }
.screening-poster { position: sticky; top: 1.5rem; }
.screening-poster img { display: block; width: 100%; height: auto; }
.screening-body { min-width: 0; }
.content-frame .screening-body .date { margin: .4rem 0 .5rem; font-size: clamp(1.8rem, 3vw, 2.2rem); }
.content-frame .screening-body .content-title { font-size: clamp(1.8rem, 3vw, 2.2rem); }
/* The flyer's frame: right-aligned caps labels with a colon, values beside them, air around it. */
.frame { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; margin: 1.6rem 0 1.4rem; padding: 1.5rem 1.75rem; border: 1px solid var(--screen); font-size: 16px; line-height: 1.5; }
.frame div { display: contents; }
.frame dt { margin: 0; color: var(--screen); font-weight: 500; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; line-height: 2; text-align: right; }
.frame dt::after { content: ":"; }
.frame dd { margin: 0; color: var(--screen); }
.content-frame .frame a { color: inherit; }
.content-frame .frame a.ticket-link { color: var(--grime); text-decoration: none; }
.content-frame .host { margin: 0 0 2rem; color: var(--dim); font-size: 15px; line-height: 1.5; max-width: 60ch; }
.content-frame .happened { margin: 0 0 1.6rem; font-weight: 300; font-size: 1.3rem; line-height: 1.4; color: var(--screen); max-width: 40ch; }
.first-time { margin-top: 2.2rem; }
.next { margin-top: 3rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .screening { grid-template-columns: 1fr; gap: 1.6rem; }
  .screening-poster { position: static; width: 220px; margin: 0 auto 1.25rem; }
  .frame { padding: 1.1rem 1.1rem; gap: .35rem .8rem; }
}

/* Galleries in this site: square-cornered, a tight gap, no inset. */
.bio-gallery { gap: 6px; margin: 1.2rem 0 1.4rem; }
.bio-gallery img { border-radius: 0; }
.bio-gallery-item, .content-frame .bio-gallery-item { border: 0; border-radius: 0; background: none; box-shadow: none; }
.lightbox img, .lightbox figure img { border-radius: 0; }
.bio-gallery-caption { margin: .4rem 0 0; color: var(--dim); font-size: 13px; line-height: 1.5; padding: 0; }
.content-frame .bio-figure { margin: 0 0 1.6rem; }
.content-frame .bio-figure .bio-gallery { margin-bottom: 0; }
/* The engine's video disclosures and thumbnails. */
.content-frame summary { color: var(--screen); font-size: 17px; padding-block: .6rem; }
.content-frame details { margin-block: .4rem 1.2rem; }
.content-frame summary:hover { color: var(--screen); }
.content-frame details video, .content-frame details iframe { border-radius: 0; border: 1px solid var(--line); }

/* Footer: the mark and the links, plain. */
.site-foot { display: grid; gap: .8rem; max-width: 720px; margin: 4rem auto 1.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
.site-foot .brand { gap: .6rem; }
.site-foot .brand-mark { width: 24px; height: 24px; }
.site-foot .wordmark { font-size: 12px; letter-spacing: .1em; color: var(--dim); }
.site-foot-group { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.site-foot a { color: var(--dim); text-decoration: none; }
.site-foot a:hover { color: var(--screen); }
.back { display: inline-block; margin: 0 0 1.6rem; color: var(--dim); font-size: 14px; text-decoration: none; }
.back:hover { color: var(--screen); }

/* ---- Engine markup the content uses (galleries, veils, lightbox, code, diagrams), kept from the shared engine. ---- */
.bio-gallery { display: flex; gap: .75rem; align-items: flex-start; }
.bio-gallery-item { display: block; flex: var(--ratio, 1) 1 0; min-width: 0; }
.bio-gallery-item:nth-child(2n) { margin-top: 0; }
.bio-gallery.is-mixed { align-items: center; }
.bio-gallery-item img { display: block; width: 100%; height: auto; }

.content-frame .bio-figure { margin: 0 0 1.45rem; }
.content-frame .bio-figure .bio-gallery { margin-bottom: 0; }
.bio-gallery-caption { margin: .5rem 0 0; padding-inline: var(--inset); color: var(--text-nav); font-family: var(--font-ui); font-size: 12px; line-height: 1.5; }
.bio-gallery.portrait { max-width: 460px; margin-inline: auto; }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: auto; cursor: zoom-out; }
.lightbox::backdrop { background: rgb(0 0 0 / .88); }
.lightbox figure { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; margin: 0; padding: 2rem 1rem; box-sizing: border-box; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 6rem); object-fit: contain; border-radius: 3px; cursor: zoom-in; }
.lightbox.is-zoomed figure { display: block; }
.lightbox.is-zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
.lightbox figcaption { margin-top: .75rem; color: #d6d3d1; font-family: var(--font-ui); font-size: 13px; text-align: center; }
.bio-gallery-item { position: relative; }
.bio-gallery-item.is-veiled { cursor: pointer; }
.bio-gallery-item.is-veiled img { filter: blur(10px) brightness(.85); transform: scale(1.06); }
.veil-label { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; padding: 1rem; color: #fff; font-family: var(--font-ui); font-size: 13px; line-height: 1.4; text-align: center; text-shadow: 0 1px 3px rgb(0 0 0 / .6); }
.bio-gallery-item.is-veiled .veil-label { display: flex; }
.veil-hide { position: absolute; left: .5rem; bottom: .5rem; padding: .1rem .55rem; border-radius: 999px; background: rgb(0 0 0 / .55); color: #fff; font-family: var(--font-ui); font-size: 12px; line-height: 1.6; cursor: pointer; }
.veil-hide:hover, .veil-hide:focus-visible { background: rgb(0 0 0 / .8); }
.bio-gallery-item.is-veiled .veil-hide { display: none; }
.content-frame details:not([open]) > summary:hover::before { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .content-frame details:not([open]) > summary:hover::before { transform: none; } }
.content-frame pre { position: relative; }
.content-frame pre[data-lang]::before { content: attr(data-lang); position: absolute; top: .55rem; right: .8rem; color: var(--text-nav); font-family: var(--font-ui); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.content-frame pre code { color: var(--text-copy); }
.hl-c { color: var(--text-nav); font-style: italic; }
.hl-s { color: var(--hue-2); }
.hl-k { color: var(--hue-6); }
.hl-n { color: var(--hue-5); }
.hl-f { color: var(--hue-3); }
.hl-v { color: var(--hue-1); }
.hl-a { color: var(--hue-7); }
.hl-t { color: var(--hue-3); }
.hl-o { color: var(--text-nav); }
.content-frame .content-diagram {
  /* Wider than the text column when the window allows: up to 900px, centered on the column. */
  --diagram-width: max(100%, min(900px, 100vw - 180px));
  width: var(--diagram-width);
  margin-left: calc((100% - var(--diagram-width)) / 2);
  --diagram-ink: var(--text-heading);
  --diagram-muted: var(--text-nav);
  --diagram-fill: var(--surface-subtle);
  --diagram-box: var(--bg);
  --diagram-line: var(--line-subtle);
  --diagram-ink-fill: var(--text-heading);
  --diagram-panel: color-mix(in srgb, var(--hue-7) 6%, transparent);
  --diagram-green: color-mix(in srgb, var(--hue-2) 22%, var(--bg));
  --diagram-purple: color-mix(in srgb, var(--hue-6) 22%, var(--bg));
  --diagram-red: color-mix(in srgb, var(--hue-1) 22%, var(--bg));
  --diagram-yellow: color-mix(in srgb, var(--hue-4) 22%, var(--bg));
  margin-block: 0 1.45rem;
}
.content-diagram svg { display: block; width: 100%; height: auto; font-family: var(--font-ui); }
.content-diagram svg text:not([fill]) { fill: var(--diagram-ink); }
.content-diagram svg text:not([fill]) tspan:not([fill]) { fill: inherit; }
.content-diagram .bio-gallery-caption { padding-inline: 0; max-width: 600px; margin-inline: auto; }

/* The recap video, open on the page: the thing people share. */
.recap { margin: 1.4rem 0 1.8rem; }
.recap video { display: block; width: min(100%, 480px); aspect-ratio: 1; background: var(--black); border: 1px solid var(--line); }
.recap figcaption { margin: .6rem 0 0; color: var(--dim); font-size: 14px; }
/* What's next, inline on a page (the @next directive): no heading, no rule. */
.next.next-inline { margin-top: 1rem; padding-top: 0; border-top: 0; }
