/* Sinkhole shared pieces: palette, the dirty flickering title, tagline, logline, credits.
   One visual world, so the palette is fixed in both themes. */
:root { color-scheme: dark; --bg: #0b0907; --surface: #15110e; --bone: #e9e1d3; --dim: rgba(233,225,211,.55); --faint: rgba(233,225,211,.32); --rule: rgba(233,225,211,.1); --rust: #8e4f34; --rose: rgb(224,168,178); }
:root[data-theme=light], :root[data-theme=dark] { color-scheme: dark; }
* { box-sizing: border-box; min-width: 0; }
html, body { background: var(--bg); color: var(--bone); }
body { margin: 0; font: 16px/1.55 "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; transition: color 1.2s ease; }
a:hover, a:focus-visible { color: var(--rose); }
a:focus-visible, button:focus-visible { outline: 1px solid var(--faint); outline-offset: 4px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.rings { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.shade { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

/* The title: Graham's logo, a dirty print with flicker, weave, grime and a stray scratch */
.sk-title { position: relative; width: min(62vw, 540px); margin: 0; animation: weave .42s steps(1) infinite; }
.sk-title img { display: block; width: 100%; height: auto; animation: flicker 7.3s linear infinite; }
.sk-title::after { content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: .55;
  -webkit-mask: url('sinkhole-title.png') center / 100% 100% no-repeat; mask: url('sinkhole-title.png') center / 100% 100% no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='d'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.6 1.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23d)'/%3E%3C/svg%3E");
  animation: grime .7s steps(5) infinite; }
.sk-title::before { content: ''; position: absolute; top: -6%; bottom: -6%; left: 38%; width: 1px; background: rgba(233,225,211,.35); opacity: 0; pointer-events: none; animation: scratch 11s linear infinite; }
@keyframes flicker { 0%,100%{opacity:1} 6%{opacity:.93} 7%{opacity:1} 22%{opacity:.97} 31%{opacity:1} 32%{opacity:.78} 33%{opacity:.96} 34%{opacity:1} 58%{opacity:.91} 59%{opacity:1} 76%{opacity:.95} 81%{opacity:.84} 82%{opacity:1} }
@keyframes weave { 0%{transform:translate(0,0)} 25%{transform:translate(.4px,-.5px)} 50%{transform:translate(-.3px,.3px)} 75%{transform:translate(.2px,.6px)} }
@keyframes grime { 0%{background-position:0 0} 20%{background-position:-60px 40px} 40%{background-position:80px -30px} 60%{background-position:-20px -90px} 80%{background-position:110px 70px} 100%{background-position:0 0} }
@keyframes scratch { 0%,61%{opacity:0;left:38%} 62%{opacity:.6;left:38%} 63%{opacity:.2;left:38.4%} 64%{opacity:.5;left:38.2%} 65%,100%{opacity:0;left:38.2%} }

.sk-status { margin: 1.5rem 0 0; font-size: 1rem; color: var(--dim); }

/* the world withholds: rose, IM Fell, only for the still */
.sk-tag { margin: 0; font-family: 'IM Fell English SC', 'Iowan Old Style', Georgia, serif; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .22em; padding-left: .22em; color: var(--rose); opacity: 0; filter: blur(3px); white-space: nowrap; pointer-events: none; transition: opacity .7s ease, filter .7s ease; }
.sk-tag.surfaced { opacity: .6; filter: blur(0); transition: opacity 6s ease, filter 6s ease; }

/* Logline surfaces out of a blur */
.sk-logline { margin: 0 auto; max-width: 34rem; text-align: center; font-size: clamp(1.1rem, 1.7vw, 1.35rem); line-height: 1.7; opacity: 0; filter: blur(4px); transition: opacity 2.6s ease, filter 2.6s ease; }
.sk-logline.surfaced { opacity: .9; filter: none; }

/* End-credits layout */
.sk-credits { max-width: 44rem; margin: 0 auto; font-size: .92rem; line-height: 1.5; }
.sk-credit { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 2.25rem; padding: .32rem 0; }
.sk-credit span:first-child { text-align: right; color: var(--dim); }
.sk-credit span:last-child { text-align: left; }
.sk-credit-head { margin: 3.5rem 0 1.1rem; text-align: center; font-size: .85rem; font-weight: 400; color: var(--faint); font-variant: small-caps; letter-spacing: .04em; }
.sk-credits > .sk-credit-head:first-child { margin-top: 0; }

@media (max-width: 560px) { .sk-credit { gap: 1rem; font-size: .85rem; } .sk-title { width: 78vw; } }
@media (prefers-reduced-motion: reduce) {
  .sk-title, .sk-title img, .sk-title::after, .sk-title::before { animation: none; }
  .sk-logline { opacity: .9; filter: none; transition: none; }
}

/* A small note that marks what is a guess in these previews */
.guess { position: fixed; z-index: 50; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(14px, env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--faint); max-width: 22rem; line-height: 1.4; }
.guess b { font-weight: 400; color: var(--dim); }
