/* Yapcine: one random full-bleed loop with search, quiet filter chips, a dense 4:5 feed, a lightbox on tap.
   UI is black and white; the works keep their real colour. */
:root {
  --ink: #050505; --paper: #f2f2f2; --grey: #8a8a8a; --line: #222; --pill: #1a1a1a;
  --display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sl: max(16px, env(safe-area-inset-left, 0px)); --sr: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent }
html { background: var(--ink); -webkit-text-size-adjust: 100% }
body { background: var(--ink); color: var(--paper); font: 15px/1.5 var(--display); margin: 0; padding-bottom: env(safe-area-inset-bottom, 0px) }
a { color: inherit }
button { font: inherit; color: inherit }
video { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--pill) }
.m { font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase }
.q { color: var(--grey) }
:focus-visible { outline: 1px solid var(--paper); outline-offset: 2px }

/* opening screen: svh so in-app browsers (WhatsApp, Instagram) never cut the bottom off */
.open { position: relative; height: 88vh; height: 88svh; max-height: 860px; min-height: 480px; overflow: hidden }
.open video { position: absolute; inset: 0 }
.open::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.35), transparent 30%, transparent 55%, rgba(0,0,0,.55)); pointer-events: none }
.yap { position: absolute; z-index: 2; top: max(18px, env(safe-area-inset-top, 0px)); left: var(--sl); font: 800 18px/1 var(--display); letter-spacing: -.01em; text-decoration: none }
.crl { position: absolute; z-index: 2; top: max(20px, env(safe-area-inset-top, 0px)); right: var(--sr); text-decoration: none; opacity: .8 }
.find { position: absolute; z-index: 2; left: var(--sl); right: var(--sr); top: 50%; transform: translateY(-50%); display: flex; justify-content: center }
.find label { width: min(640px, 100%); display: flex; align-items: center; gap: 12px; background: rgba(8,8,8,.55); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.14); border-radius: 99px; padding: 0 22px }
.find svg { width: 18px; height: 18px; flex: none; stroke: var(--paper); fill: none; stroke-width: 1.6 }
.find input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--paper); font: 500 clamp(17px, 2.2vw, 22px)/1 var(--display); padding: 18px 0; -webkit-appearance: none; appearance: none }
.find input::placeholder { color: rgba(242,242,242,.6) }
.now { position: absolute; z-index: 2; left: var(--sl); right: var(--sr); bottom: 16px; opacity: .75; text-decoration: none }

/* chips */
.chips { position: sticky; top: 0; z-index: 3; background: var(--ink); display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; padding-block: 12px; padding-left: var(--sl); padding-right: var(--sr) }
.chips::-webkit-scrollbar { display: none }
.chips > * { flex: none }
.sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px }
.chip { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: none; color: var(--grey); border: 1px solid var(--line); border-radius: 99px; padding: 9px 12px; cursor: pointer }
.chip[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper) }
.count { margin-left: auto; padding-left: 12px }

/* feed */
.feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px }
.feed button { position: relative; aspect-ratio: 4 / 5; padding: 0; border: 0; background: var(--pill); cursor: pointer; overflow: hidden }
.feed .tt { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 7px; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.8)); opacity: 0; transition: opacity .15s; pointer-events: none; font: 600 13px/1.2 var(--display); text-transform: lowercase }
.feed .soon { position: absolute; top: 6px; left: 6px; padding: 3px 6px; background: rgba(0,0,0,.7); font: 500 9px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; pointer-events: none }
.feed button:hover .tt, .feed button:focus-visible .tt { opacity: 1 }
@media (hover: none) { .feed .tt { opacity: 1; font-size: 11px; padding: 18px 6px 5px } }
.empty { padding: 48px var(--sr) 48px var(--sl); color: var(--grey); margin: 0 }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.94); display: grid; place-items: center; padding: 56px var(--sr) max(24px, env(safe-area-inset-bottom, 0px)) var(--sl); overflow-y: auto }
.lb[hidden] { display: none }
.lb figure { margin: 0; width: min(560px, 100%); display: grid; gap: 12px }
.lb video { aspect-ratio: 4 / 5; height: auto; max-height: 70vh; max-height: 70svh; object-fit: contain; background: #000 }
.lb figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline }
.lb b { display: block; font: 600 17px/1.2 var(--display); text-transform: lowercase }
.lb .links { display: flex; gap: 16px }
.lb a { text-decoration: none; white-space: nowrap }
.lb .x { position: absolute; top: max(10px, env(safe-area-inset-top, 0px)); right: var(--sr); background: none; border: 0; cursor: pointer; padding: 10px; color: var(--grey) }

.foot { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; padding-block: 28px 40px; padding-left: var(--sl); padding-right: var(--sr); border-top: 1px solid var(--line); margin-top: 2px }
.foot a { text-decoration: none }

@media (min-width: 700px) { .feed { grid-template-columns: repeat(5, minmax(0, 1fr)) } }
@media (min-width: 1200px) { .feed { grid-template-columns: repeat(6, minmax(0, 1fr)) } }
@media (prefers-reduced-motion: reduce) { .feed .tt { transition: none } }

/* credits page */
.page { max-width: 680px; margin: 0 auto; padding: 24px var(--sr) 64px var(--sl) }
.page header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 48px }
.page header a { text-decoration: none }
.page h1 { font: 800 clamp(32px, 7vw, 56px)/1 var(--display); letter-spacing: -.02em; margin: 0 0 24px; text-transform: lowercase }
.page h2 { font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin: 40px 0 10px }
.page p { margin: 0 0 12px; max-width: 60ch }
.page .mail { font: 600 20px/1.3 var(--display); text-decoration: none; border-bottom: 1px solid var(--line); overflow-wrap: anywhere }
.list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line) }
.list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line) }
.list a { text-decoration: none }
