/* Count Gauntly's Horrors from the Public Domain
   Horror-host theme: crypt black, skeleton-shirt green, bone, dried blood. */

@font-face { font-family: "Cinzel"; src: url("fonts/cinzel-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("fonts/cinzel-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --crypt: #150d1a;      /* page background */
  --shroud: #3a2742;     /* rules and borders */
  --skeleton: #c9e33f;   /* the Count's skeleton shirt */
  --bone: #ece4ce;       /* body text */
  --ash: #ab9db3;        /* secondary text */
  --blood: #8f1616;      /* episode tags */
  --black: #000;
  --measure: 66ch;
  --wide: 1200px;
  --gutter: 1.25rem;
  --gothic: "Cinzel", "Trajan Pro", Georgia, serif;      /* display: Roman capitals, horror-poster style */
  --text: "Literata", Georgia, "Times New Roman", serif;   /* body: built for easy reading */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .09 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --tv-static: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='135'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2.4' intercept='-.75'/%3E%3CfeFuncG type='linear' slope='2.4' intercept='-.75'/%3E%3CfeFuncB type='linear' slope='2.4' intercept='-.75'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  --ooze: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='54'%3E%3Cg fill='%23c9e33f'%3E%3Crect width='260' height='7'/%3E%3Crect x='14' width='9' height='22' rx='4.5'/%3E%3Ccircle cx='18.5' cy='21' r='5.5'/%3E%3Crect x='61' width='6' height='13' rx='3'/%3E%3Crect x='104' width='12' height='38' rx='6'/%3E%3Ccircle cx='110' cy='38' r='7'/%3E%3Crect x='150' width='7' height='17' rx='3.5'/%3E%3Ccircle cx='153.5' cy='17' r='4.5'/%3E%3Crect x='196' width='10' height='29' rx='5'/%3E%3Ccircle cx='201' cy='29' r='6'/%3E%3Crect x='238' width='6' height='11' rx='3'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html {
  background: var(--crypt) var(--grain);
  color: var(--bone);
  font: 400 1.125rem/1.65 var(--text);
  -webkit-text-size-adjust: 100%;
}
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

a { color: var(--skeleton); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--skeleton); outline-offset: 3px; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -4rem; background: var(--skeleton); color: var(--black); padding: .5rem .9rem; font-weight: 700; z-index: 10; }
.skip:focus { top: .5rem; }

/* ---------- masthead (inner pages) ---------- */
.masthead { background: var(--black); border-bottom: 1px solid var(--shroud); }
.masthead-inner {
  max-width: var(--wide); margin: 0 auto; padding: .7rem var(--gutter) .8rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 2rem;
}
.wordmark {
  font: 900 1.45rem/1 var(--gothic); color: var(--skeleton); text-decoration: none; letter-spacing: .02em;
}
.wordmark span { display: block; margin-top: .3rem; font: 700 .85rem/1.1 var(--text); color: var(--bone); text-shadow: none; }
.all-eps { color: var(--bone); font-weight: 700; text-decoration: none; }
.all-eps:hover { color: var(--skeleton); text-decoration: underline; }

/* ---------- home: the title card ---------- */
.hero {
  position: relative; z-index: 1;
  background:
    radial-gradient(ellipse 60% 70% at 28% 45%, rgb(201 227 63 / .13), transparent 70%),
    var(--grain), var(--black);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -47px; height: 54px;
  background: var(--ooze) repeat-x left top;
}
.hero-card {
  position: relative; max-width: var(--wide); margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
  display: flex; flex-wrap: wrap; align-items: center; gap: 2.5rem 4rem;
}
.hero-text { flex: 1 1 100%; }
.hero h1 {
  margin: 0; font: 900 clamp(2.5rem, 8vw, 6.5rem)/1 var(--gothic); color: var(--skeleton);
  letter-spacing: .01em;
  text-shadow: 0 .05em 0 var(--black), 0 0 .5em rgb(201 227 63 / .22);
}
.hero h1 span {
  display: block; margin-top: .45em; font-weight: 700; font-size: .42em; line-height: 1.15; letter-spacing: .03em;
  color: var(--bone); text-shadow: 0 .06em 0 var(--black);
}
.byline { margin: 1.4rem 0 0; font: italic 400 clamp(1.1rem, 2vw, 1.35rem)/1.3 var(--text); color: var(--ash); }
.bug { position: absolute; right: var(--gutter); bottom: 1.4rem; font: 700 1rem/1 var(--gothic); color: rgb(236 228 206 / .45); letter-spacing: .04em; }

/* ---------- episode list ---------- */
.episodes, .cast, .notfound { max-width: var(--wide); margin: 0 auto; padding: 2.5rem var(--gutter) 4rem; }
.home .episodes { padding-top: 5rem; }
.episodes h2, .cast h1, .notfound h1, .character h1 {
  margin: 0 0 .3rem; font: 900 clamp(2rem, 4.5vw, 2.9rem)/1.1 var(--gothic); color: var(--skeleton);
  letter-spacing: .02em; text-shadow: 0 .05em 0 var(--black);
}
.guide {
  list-style: none; padding: 0; margin: 1.75rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr)); gap: 2.1rem 1.4rem;
}
.guide a { display: block; color: var(--bone); text-decoration: none; }
.screen {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  background: #0b0b0b; border: 3px solid var(--black); outline: 1px solid var(--shroud);
}
.screen img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) contrast(1.05); }
.tag {
  position: absolute; left: .5rem; bottom: .5rem;
  background: var(--blood); color: var(--bone);
  font: 700 1rem/1 var(--text); padding: .3em .55em .32em;
  box-shadow: 2px 2px 0 var(--black);
}
.ep-name { display: block; margin-top: .55rem; font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.guide a:hover .screen { outline-color: var(--skeleton); box-shadow: 0 0 22px rgb(201 227 63 / .35); }
.guide a:hover img { filter: none; }
.guide a:hover .ep-name { color: var(--skeleton); }
.untitled { color: var(--ash); font-weight: 400; font-style: italic; }

/* TV static stands in for episodes with no video */
.static { position: absolute; inset: 0; background: #1a1a1a var(--tv-static); background-size: 240px 135px; }
.nosignal {
  position: absolute; left: 50%; top: 28%; transform: translateX(-50%);
  background: var(--black); color: var(--bone); white-space: nowrap;
  font-size: .8rem; font-weight: 700; padding: .2rem .55rem;
}

/* ---------- episode and character pages ---------- */
.episode, .character { max-width: 1000px; margin: 0 auto; padding: 2.5rem var(--gutter) 1rem; }
.character h1 { margin-bottom: 1.25rem; }
.ep-title {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: .35em .6em; margin: 0 0 1.5rem;
  font: 900 clamp(1.9rem, 4.6vw, 3.1rem)/1.12 var(--gothic); color: var(--skeleton); letter-spacing: .015em;
  text-shadow: 0 .05em 0 var(--black);
}
.ep-title .tag { position: static; flex: none; font-size: .42em; margin-top: .4em; text-shadow: none; letter-spacing: 0; }
.ep-title-text { flex: 1 1 14rem; }
.ep-title .untitled { color: var(--ash); font-style: normal; }

.player { position: relative; margin: 0 0 .6rem; background: var(--black); border: 3px solid var(--black); outline: 1px solid var(--shroud); }
.player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.player.r4-3 { max-width: 800px; }
.player.r4-3 iframe { aspect-ratio: 4 / 3; }
.player.empty { aspect-ratio: 16 / 9; overflow: hidden; }
.player.empty .static { background-size: 360px 202px; }
.player.empty figcaption {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  background: var(--black); color: var(--bone); font-weight: 700; padding: .5rem .95rem; text-align: center;
}
.watch { margin: 0 0 2rem; font-size: 1rem; }

.entry { max-width: var(--measure); }
.entry p { margin: 0 0 1rem; }
.entry h2.label { margin: 2.2rem 0 .5rem; font: 700 1.3rem/1.2 var(--gothic); color: var(--skeleton); letter-spacing: .03em; }
.entry > h2.label:first-child { margin-top: 0; }
.entry ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.entry li { margin: .15rem 0; }
.entry li::marker { color: var(--skeleton); }
.entry blockquote { margin: 0 0 1.25rem; padding: .1rem 0 .1rem 1.1rem; border-left: 3px solid var(--blood); }
.entry blockquote p:last-child { margin-bottom: 0; }
.entry figure { margin: 0 0 1.75rem; }
.entry figure img { display: block; max-width: 100%; height: auto; border: 3px solid var(--black); outline: 1px solid var(--shroud); }
.entry figcaption { color: var(--ash); font-size: .95rem; margin-top: .4rem; }
.entry .player { margin-top: .5rem; }

details.schedule { margin: 2.2rem 0 1rem; border-block: 1px solid var(--shroud); }
details.schedule summary { cursor: pointer; padding: .7rem 0; font: 700 1.3rem/1.2 var(--gothic); color: var(--skeleton); letter-spacing: .03em; }
details.schedule summary::marker { color: var(--ash); font-size: .8em; }
details.schedule[open] summary { margin-bottom: .4rem; }
details.schedule blockquote { margin-bottom: 1rem; }

.ep-nav {
  max-width: 1000px; margin: 1.5rem auto 0; padding: 1.5rem var(--gutter) 3.5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.ep-nav a { font-weight: 700; text-decoration: none; line-height: 1.3; border-top: 1px solid var(--shroud); padding-top: .7rem; }
.ep-nav a:hover { text-decoration: underline; }
.ep-nav small { display: block; color: var(--ash); font-size: .85rem; margin-bottom: .1rem; }
.ep-nav .next { text-align: right; grid-column: 2; }

.cast-list {
  list-style: none; padding: 0; margin: 1.75rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1.4rem 2rem;
}
.cast-list li { border-top: 1px solid var(--shroud); padding-top: .65rem; }
.cast-list a { font-weight: 700; font-size: 1.25rem; }
.played { display: block; color: var(--ash); font-size: 1rem; }

/* ---------- footer ---------- */
.site-foot { background: var(--black); border-top: 1px solid var(--shroud); color: var(--ash); }
.site-foot p { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); font-size: 1rem; }
.site-foot p:first-child { padding-top: 1.4rem; }
.site-foot p:last-child { padding-bottom: 1.6rem; }
.site-foot cite { font-style: italic; color: var(--bone); }

@media (max-width: 560px) {
  html { font-size: 1.05rem; }
  .guide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem .9rem; }
  .tag { font-size: .92rem; }
  .ep-name { font-size: 1rem; }
  .ep-nav { grid-template-columns: 1fr; }
  .ep-nav .next { grid-column: 1; text-align: left; }
  .bug { display: none; }
}
